Module: ExtensibleObjectHelper::ClassMethods

Defined in:
app/helpers/extensible_object_helper.rb

Instance Method Summary collapse

Instance Method Details

#handle_extensionsObject



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'app/helpers/extensible_object_helper.rb', line 12

def handle_extensions      
  /^(#{BRISKBILLS_ROOT}.+)\.rb\:[\d]+/.match caller[0]
  
  extension_directory = $1
  
  Find.find(extension_directory) do |f| 
    # Don't traverse sub-directories:
    Find.prune if f != extension_directory and File.directory?(f)

    require_dependency f if /#{extension_directory}\/.+\.rb$/.match f 
  end if File.directory? extension_directory
  
end