Class: Yoda::Server::Workspace::UriEncoder
- Inherits:
-
Object
- Object
- Yoda::Server::Workspace::UriEncoder
- Defined in:
- lib/yoda/server/workspace.rb
Instance Attribute Summary collapse
- #base_path ⇒ String readonly
Instance Method Summary collapse
-
#initialize(base_path) ⇒ UriEncoder
constructor
A new instance of UriEncoder.
- #uri_of_path(path) ⇒ String
Constructor Details
#initialize(base_path) ⇒ UriEncoder
Returns a new instance of 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_path ⇒ String (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.(path, base_path)}" end |