Class: BoardGameGem::BGGFamily
Instance Attribute Summary collapse
-
#alternate_names ⇒ Object
readonly
Returns the value of attribute alternate_names.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#image ⇒ Object
readonly
Returns the value of attribute image.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#thumbnail ⇒ Object
readonly
Returns the value of attribute thumbnail.
Instance Method Summary collapse
-
#initialize(xml) ⇒ BGGFamily
constructor
A new instance of BGGFamily.
Constructor Details
#initialize(xml) ⇒ BGGFamily
Returns a new instance of BGGFamily.
6 7 8 9 10 11 12 13 |
# File 'lib/bgg_family.rb', line 6 def initialize(xml) @id = get_integer(xml, "item", "id") @thumbnail = get_string(xml, "thumbnail") @image = get_string(xml, "image") @name = get_string(xml, "name[type='primary']", "value") @alternate_names = get_strings(xml, "name[type='alternate']", "value") @description = get_string(xml, "description") end |
Instance Attribute Details
#alternate_names ⇒ Object (readonly)
Returns the value of attribute alternate_names.
4 5 6 |
# File 'lib/bgg_family.rb', line 4 def alternate_names @alternate_names end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
4 5 6 |
# File 'lib/bgg_family.rb', line 4 def description @description end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/bgg_family.rb', line 4 def id @id end |
#image ⇒ Object (readonly)
Returns the value of attribute image.
4 5 6 |
# File 'lib/bgg_family.rb', line 4 def image @image end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/bgg_family.rb', line 4 def name @name end |
#thumbnail ⇒ Object (readonly)
Returns the value of attribute thumbnail.
4 5 6 |
# File 'lib/bgg_family.rb', line 4 def thumbnail @thumbnail end |