Class: Pathname
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
-
#/(path) ⇒ Pathname
Append path segments and expand to absolute path.
Class Method Details
.[](*vals) ⇒ Object
17 18 19 |
# File 'lib/wukong/extensions/pathname.rb', line 17 def self.[](*vals) new( File.join(vals) ) end |
Instance Method Details
#/(path) ⇒ Pathname
Append path segments and expand to absolute path
file = Pathname(Dir.pwd) / "subdir1" / :subdir2 / "filename.ext"
13 14 15 |
# File 'lib/wukong/extensions/pathname.rb', line 13 def /(path) (self + path). end |