class LanguageServer::FileStore::FilePath
Attributes
local_path[R]
local_root[R]
remote_root[R]
Public Class Methods
from_remote_uri(remote_root:, local_root:, remote_uri:)
click to toggle source
# File lib/language_server/file_store.rb, line 9 def from_remote_uri(remote_root:, local_root:, remote_uri:) new(remote_root: remote_root, local_root: local_root, local_path: URI(remote_uri).path.sub(remote_root, local_root)) end
new(remote_root:, local_root:, local_path:)
click to toggle source
# File lib/language_server/file_store.rb, line 16 def initialize(remote_root:, local_root:, local_path:) @remote_root = remote_root @local_root = local_root @local_path = local_path end
Public Instance Methods
==(other)
click to toggle source
# File lib/language_server/file_store.rb, line 30 def ==(other) eql?(other) end
eql?(other)
click to toggle source
# File lib/language_server/file_store.rb, line 26 def eql?(other) self.class == other.class && remote_path == other.remote_path end
hash()
click to toggle source
# File lib/language_server/file_store.rb, line 34 def hash self.remote_path.hash end
remote_path()
click to toggle source
# File lib/language_server/file_store.rb, line 22 def remote_path @remote_path ||= local_path.sub(local_root, remote_root) end