Class: Passbook::PKPass
- Inherits:
-
Object
- Object
- Passbook::PKPass
- Defined in:
- lib/passbook/pk_pass.rb
Instance Method Summary collapse
- #content_type ⇒ Object
-
#initialize(specs, assets, authority) ⇒ PKPass
constructor
A new instance of PKPass.
- #to_file(path) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(specs, assets, authority) ⇒ PKPass
Returns a new instance of PKPass.
9 10 11 12 13 14 |
# File 'lib/passbook/pk_pass.rb', line 9 def initialize(specs, assets, ) @pass = Pass.new(specs) @assets = Assets.new(assets) @manifest = Manifest.new(@pass, @assets) @signature = Signature.new(@manifest, ) end |
Instance Method Details
#content_type ⇒ Object
16 17 18 |
# File 'lib/passbook/pk_pass.rb', line 16 def content_type "application/vnd.apple.pkpass" end |
#to_file(path) ⇒ Object
24 25 26 |
# File 'lib/passbook/pk_pass.rb', line 24 def to_file(path) File.write(path, to_s) end |