Class: Module

Inherits:
Object
  • Object
show all
Defined in:
lib/loadable/class_require.rb

Instance Method Summary collapse

Instance Method Details

#module_require(child) ⇒ Object



2
3
4
5
6
7
# File 'lib/loadable/class_require.rb', line 2

def module_require(child)
  child = child.to_s.gsub('::','/').downcase
  path  = name.to_s.gsub('::','/').downcase
  path  = File.join(path, child)
  require_relative(path)
end