Class: Tomo::Path

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/tomo/path.rb

Instance Method Summary collapse

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

#dirnameObject



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