Class: Gatherer::Printing
- Inherits:
-
Object
- Object
- Gatherer::Printing
- Defined in:
- lib/gatherer/printing.rb
Instance Attribute Summary collapse
-
#expansion ⇒ Object
readonly
Returns the value of attribute expansion.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#rarity ⇒ Object
readonly
Returns the value of attribute rarity.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Printing
constructor
A new instance of Printing.
- #to_hash ⇒ Object
Constructor Details
#initialize(attributes) ⇒ Printing
Returns a new instance of Printing.
5 6 7 8 9 |
# File 'lib/gatherer/printing.rb', line 5 def initialize(attributes) @expansion = attributes[:expansion] @rarity = attributes[:rarity] @number = attributes[:number] end |
Instance Attribute Details
#expansion ⇒ Object (readonly)
Returns the value of attribute expansion.
3 4 5 |
# File 'lib/gatherer/printing.rb', line 3 def expansion @expansion end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
3 4 5 |
# File 'lib/gatherer/printing.rb', line 3 def number @number end |
#rarity ⇒ Object (readonly)
Returns the value of attribute rarity.
3 4 5 |
# File 'lib/gatherer/printing.rb', line 3 def rarity @rarity end |
Instance Method Details
#to_hash ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/gatherer/printing.rb', line 11 def to_hash { expansion: @expansion.to_hash, rarity: @rarity, number: @number } end |