This is similar to FILE and LINE, and returns a String representing the directory of the current file is. Unlike FILE the path returned is absolute.
This method is convenience for the
File.expand_path(File.dirname(__FILE__))
idiom.
# File lib/ramaze/snippets/object/__dir__.rb, line 17 17: def __DIR__(*args) 18: filename = caller[0][/^(.*):/, 1] 19: dir = File.expand_path(File.dirname(filename)) 20: ::File.expand_path(::File.join(dir, *args.map{|a| a.to_s})) 21: end
# File lib/ramaze/snippets/object/instance_variable_defined.rb, line 10 10: def instance_variable_defined?(variable) 11: instance_variables.include?(variable.to_s) 12: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.