We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Require relative to current file path:
require File.expand_path("../../bin", __FILE__)
Add path to load path ($LOAD_PATH) so we can require files in a folder:
$:.unshift('path/to/files')
Get the filename, extension and dirname:
File.basename("/home/gumby/work/ruby.rb") #=> "ruby.rb" File.extname("a/b/d/test.rb") #=> ".rb" File.dirname("/home/gumby/work/ruby.rb") #=> "/home/gumby/work"
There was an error while loading. Please reload this page.