Class: Passkit::Factory

Inherits:
Object
  • Object
show all
Defined in:
lib/passkit/factory.rb

Class Method Summary collapse

Class Method Details

.create_pass(pass_class, generator = nil) ⇒ Object



4
5
6
7
# File 'lib/passkit/factory.rb', line 4

def create_pass(pass_class, generator = nil)
  pass = Passkit::Pass.create!(klass: pass_class, generator: generator)
  Passkit::Generator.new(pass).generate_and_sign
end