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