Module: RoSupport::FileActions::ClassMethods

Defined in:
lib/ro_support/file_actions.rb

Instance Method Summary collapse

Instance Method Details

#autoload_all_files_in(dir) ⇒ Object



47
48
49
50
51
52
53
54
55
# File 'lib/ro_support/file_actions.rb', line 47

def autoload_all_files_in(dir)
  Dir[File.join dir, "**"].each do |file|
    if file[/\.rb$/]
      module_name = File.basename(file).gsub(/\.rb/, '').camelize
      autoload module_name.to_sym, file
      autoload module_name.upcase, file
    end
  end
end