Class: Brickset::Theme

Inherits:
Object
  • Object
show all
Defined in:
lib/brickset/theme.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/brickset/theme.rb', line 3

def name
  @name
end

#set_countObject

Returns the value of attribute set_count.



3
4
5
# File 'lib/brickset/theme.rb', line 3

def set_count
  @set_count
end

#subtheme_countObject

Returns the value of attribute subtheme_count.



3
4
5
# File 'lib/brickset/theme.rb', line 3

def subtheme_count
  @subtheme_count
end

#year_fromObject

Returns the value of attribute year_from.



3
4
5
# File 'lib/brickset/theme.rb', line 3

def year_from
  @year_from
end

#year_toObject

Returns the value of attribute year_to.



3
4
5
# File 'lib/brickset/theme.rb', line 3

def year_to
  @year_to
end