Module: Hyraft::Pathway
- Defined in:
- lib/hyraft/pathway.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.pathway(path) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/hyraft/pathway.rb', line 5 def self.pathway(path) # Use the app's ROOT from boot.rb if defined?(::ROOT) full_path = File.join(::ROOT, path) else full_path = File.join(Dir.pwd, path) end # Add .rb extension if missing full_path = "#{full_path}.rb" unless full_path.end_with?('.rb') # puts "Loading: #{full_path}" if ENV['DEBUG'] require full_path end |