Class: Brickset::Subtheme

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#set_countObject

Returns the value of attribute set_count.



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

def set_count
  @set_count
end

#themeObject

Returns the value of attribute theme.



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

def theme
  @theme
end

#year_fromObject

Returns the value of attribute year_from.



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

def year_from
  @year_from
end

#year_toObject

Returns the value of attribute year_to.



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

def year_to
  @year_to
end