Class: Brickset::Subtheme
- Inherits:
-
Object
- Object
- Brickset::Subtheme
- Defined in:
- lib/brickset/subtheme.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#set_count ⇒ Object
Returns the value of attribute set_count.
-
#theme ⇒ Object
Returns the value of attribute theme.
-
#year_from ⇒ Object
Returns the value of attribute year_from.
-
#year_to ⇒ Object
Returns the value of attribute year_to.
Instance Method Summary collapse
-
#initialize(data) ⇒ Subtheme
constructor
theme String subtheme String setCount Integer yearFrom Integer Populated by getSubthemes method only yearTo Integer Populated by getSubthemes method only.
Constructor Details
#initialize(data) ⇒ Subtheme
theme String subtheme String setCount Integer yearFrom Integer Populated by getSubthemes method only yearTo Integer Populated by getSubthemes method only
9 10 11 12 13 14 15 |
# File 'lib/brickset/subtheme.rb', line 9 def initialize(data) @theme = data.dig(:theme) @name = data.dig(:subtheme) @set_count = data.dig(:set_count).to_i @year_from = data.dig(:year_from).to_i @year_to = data.dig(:year_to).to_i end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/brickset/subtheme.rb', line 3 def name @name end |
#set_count ⇒ Object
Returns the value of attribute set_count.
3 4 5 |
# File 'lib/brickset/subtheme.rb', line 3 def set_count @set_count end |
#theme ⇒ Object
Returns the value of attribute theme.
3 4 5 |
# File 'lib/brickset/subtheme.rb', line 3 def theme @theme end |
#year_from ⇒ Object
Returns the value of attribute year_from.
3 4 5 |
# File 'lib/brickset/subtheme.rb', line 3 def year_from @year_from end |
#year_to ⇒ Object
Returns the value of attribute year_to.
3 4 5 |
# File 'lib/brickset/subtheme.rb', line 3 def year_to @year_to end |