class Bumbleworks::ParticipantRegistration
Public Class Methods
autoload_all(options = {})
click to toggle source
@public 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`.
# File lib/bumbleworks/participant_registration.rb, line 11 def autoload_all(options = {}) if directory = options[:directory] || Bumbleworks.participants_directory Bumbleworks::Support.all_files(directory, :camelize => true).each do |path, name| Object.autoload name.to_sym, path end end end
register!(options = {})
click to toggle source
# File lib/bumbleworks/participant_registration.rb, line 19 def register!(options = {}) if file = options[:file] || Bumbleworks.participant_registration_file Kernel.load file else Bumbleworks.register_default_participants end end