class BoardGameGem::BGGSearchResult

Attributes

id[R]
name[R]
type[R]
year_published[R]

Public Class Methods

new(xml) click to toggle source
# File lib/bgg_search_result.rb, line 6
def initialize(xml)
        @id = xml["id"].to_i
        @type = xml["type"]
        @name = get_string(xml, "name", "value")
        @year_published = get_string(xml, "yearpublished", "value")
end

Public Instance Methods

to_item(statistics = false) click to toggle source
# File lib/bgg_search_result.rb, line 13
def to_item(statistics = false)
        return BoardGameGem.get_item(@id, statistics)
end