Class: BoardGameGem::BGGFamily

Inherits:
BGGBase
  • Object
show all
Defined in:
lib/bgg_family.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_namesObject (readonly)

Returns the value of attribute alternate_names.



4
5
6
# File 'lib/bgg_family.rb', line 4

def alternate_names
  @alternate_names
end

#descriptionObject (readonly)

Returns the value of attribute description.



4
5
6
# File 'lib/bgg_family.rb', line 4

def description
  @description
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/bgg_family.rb', line 4

def id
  @id
end

#imageObject (readonly)

Returns the value of attribute image.



4
5
6
# File 'lib/bgg_family.rb', line 4

def image
  @image
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/bgg_family.rb', line 4

def name
  @name
end

#thumbnailObject (readonly)

Returns the value of attribute thumbnail.



4
5
6
# File 'lib/bgg_family.rb', line 4

def thumbnail
  @thumbnail
end