Class: Yoda::Server::Workspace::UriEncoder

Inherits:
Object
  • Object
show all
Defined in:
lib/yoda/server/workspace.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(base_path) ⇒ UriEncoder



105
106
107
# File 'lib/yoda/server/workspace.rb', line 105

def initialize(base_path)
  @base_path = base_path
end

Instance Attribute Details

#base_pathString (readonly)



102
103
104
# File 'lib/yoda/server/workspace.rb', line 102

def base_path
  @base_path
end

Instance Method Details

#uri_of_path(path) ⇒ String



111
112
113
# File 'lib/yoda/server/workspace.rb', line 111

def uri_of_path(path)
  "file://#{File.expand_path(path, base_path)}"
end