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