Class: Passifier::Spec
- Inherits:
-
Object
- Object
- Passifier::Spec
- Defined in:
- lib/passifier/spec.rb
Overview
Pass specification, representing the pass.json file
Instance Attribute Summary collapse
-
#hash ⇒ Object
(also: #to_hash)
readonly
Returns the value of attribute hash.
-
#serial_number ⇒ Object
readonly
Returns the value of attribute serial_number.
Instance Method Summary collapse
- #filename ⇒ Object
-
#initialize(serial_number, hash) ⇒ Spec
constructor
A new instance of Spec.
-
#to_json ⇒ String
(also: #content)
The contents of the pass.json file.
Constructor Details
#initialize(serial_number, hash) ⇒ Spec
Returns a new instance of Spec.
13 14 15 16 |
# File 'lib/passifier/spec.rb', line 13 def initialize(serial_number, hash) @serial_number = serial_number @hash = hash end |
Instance Attribute Details
#hash ⇒ Object (readonly) Also known as: to_hash
Returns the value of attribute hash.
8 9 10 |
# File 'lib/passifier/spec.rb', line 8 def hash @hash end |
#serial_number ⇒ Object (readonly)
Returns the value of attribute serial_number.
8 9 10 |
# File 'lib/passifier/spec.rb', line 8 def serial_number @serial_number end |
Instance Method Details
#filename ⇒ Object
25 26 27 |
# File 'lib/passifier/spec.rb', line 25 def filename "pass.json" end |
#to_json ⇒ String Also known as: content
The contents of the pass.json file
20 21 22 |
# File 'lib/passifier/spec.rb', line 20 def to_json to_hash.to_json end |