Module: Holistic::LanguageServer::Format::FileUri
- Extended by:
- FileUri
- Included in:
- FileUri
- Defined in:
- lib/holistic/language_server/format/file_uri.rb
Instance Method Summary collapse
Instance Method Details
#extract_path(file_uri) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/holistic/language_server/format/file_uri.rb', line 7 def extract_path(file_uri) uri = URI(file_uri) return uri.path if uri.is_a?(URI::File) nil end |
#from_path(file_path) ⇒ Object
15 16 17 |
# File 'lib/holistic/language_server/format/file_uri.rb', line 15 def from_path(file_path) "file://#{file_path}" end |