Method: Object#ensure_in_path
- Defined in:
- lib/bones/helpers.rb
#ensure_in_path(*args) ⇒ Object
Adds the given arguments to the include path if they are not already there
117 118 119 120 121 122 |
# File 'lib/bones/helpers.rb', line 117 def ensure_in_path( *args ) args.each do |path| path = File.(path) $:.unshift(path) if test(?d, path) and not $:.include?(path) end end |