Class: Bumbleworks::ParticipantRegistration

Inherits:
Object
  • Object
show all
Defined in:
lib/bumbleworks/participant_registration.rb

Class Method Summary collapse

Class Method Details

.autoload_all(options = {}) ⇒ Object

Autoload all participant classes defined in files in the participants_directory. The symbol for autoload comes from the camelized version of the filename, so this method is dependent on following that convention. For example, file ‘goat_challenge.rb` should define `GoatChallenge`.



11
12
13
14
15
16
# File 'lib/bumbleworks/participant_registration.rb', line 11

def autoload_all(options = {})
  options[:directory] ||= Bumbleworks.participants_directory
  Bumbleworks::Support.all_files(options[:directory], :camelize => true).each do |path, name|
    Object.autoload name.to_sym, path
  end
end