Class: Tomo::Path
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Tomo::Path
- Defined in:
- lib/tomo/path.rb
Instance Method Summary collapse
- #dirname ⇒ Object
-
#initialize(path) ⇒ Path
constructor
A new instance of Path.
- #join(*other) ⇒ Object
Constructor Details
#initialize(path) ⇒ Path
Returns a new instance of Path.
8 9 10 11 |
# File 'lib/tomo/path.rb', line 8 def initialize(path) super(path.to_s) freeze end |
Instance Method Details
#dirname ⇒ Object
17 18 19 |
# File 'lib/tomo/path.rb', line 17 def dirname self.class.new(Pathname.new(to_s).dirname) end |
#join(*other) ⇒ Object
13 14 15 |
# File 'lib/tomo/path.rb', line 13 def join(*other) self.class.new(Pathname.new(to_s).join(*other)) end |