Class: Pathname
- Inherits:
-
Object
- Object
- Pathname
- Defined in:
- lib/pith/pathname_ext.rb
Instance Method Summary collapse
Instance Method Details
#in?(dir) ⇒ Boolean
10 11 12 13 |
# File 'lib/pith/pathname_ext.rb', line 10 def in?(dir) prefix = "#{dir}/" self.to_s[0,prefix.length] == prefix end |
#touch(mtime = nil) ⇒ Object
5 6 7 8 |
# File 'lib/pith/pathname_ext.rb', line 5 def touch(mtime = nil) FileUtils.touch(self.to_s) utime(mtime, mtime) if mtime end |