Module: Passbook

Defined in:
lib/passbook-ruby.rb,
lib/passbook/config.rb,
lib/passbook/engine.rb,
lib/passbook/pkpass.rb,
app/models/passbook/registration.rb,
app/controllers/passbook/logs_controller.rb,
app/controllers/passbook/passes_controller.rb,
app/controllers/passbook/registrations_controller.rb,
lib/rails/generators/passbook/config/config_generator.rb,
lib/rails/generators/passbook/pkpass/pkpass_generator.rb

Defined Under Namespace

Modules: Generators Classes: Config, Engine, LogsController, PassesController, Pkpass, Registration, RegistrationsController

Class Method Summary collapse

Class Method Details

.class_name_to_pass_type_id(class_name) ⇒ Object



39
40
41
42
43
# File 'lib/passbook-ruby.rb', line 39

def self.class_name_to_pass_type_id class_name
  Passbook::Config.instance.pass_config.each do |pass_type_id, config|
    return pass_type_id if config['class']==class_name
  end
end

.pass_type_id_to_class(pass_type_id) ⇒ Object



35
36
37
# File 'lib/passbook-ruby.rb', line 35

def self.pass_type_id_to_class pass_type_id
  Passbook::Config.instance.pass_config[pass_type_id]['class'].constantize
end