Class: Includer
- Inherits:
-
Object
- Object
- Includer
- Defined in:
- lib/lafcadio/includer.rb
Overview
:nodoc:
Class Method Summary collapse
Class Method Details
.include(subdir) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/lafcadio/includer.rb', line 2 def Includer.include( subdir ) dir = nil $:.each { |includeDir| attemptedDir = includeDir + '/lafcadio/' + subdir begin dir = Dir.open( attemptedDir ) rescue Errno::ENOENT # wrong include directory, try again end } if dir dir.entries.each { |entry| require "lafcadio/#{ subdir }/#{ $1 }" if entry =~ /(.*)\.rb/ } end end |