Method: Path.dir

Defined in:
lib/path.rb

.dir(from = nil) ⇒ Object

Path to the directory of this file: Path(__FILE__).dir.



19
20
21
22
# File 'lib/path.rb', line 19

def dir(from = nil)
  from ||= caller # this can not be moved as a default argument, JRuby optimizes it
  file(from).dir
end