Class: Threesixtyvoice::BadgesListGamertags
- Inherits:
-
Object
- Object
- Threesixtyvoice::BadgesListGamertags
- Defined in:
- lib/threesixtyvoice/badges_list_gamertags.rb
Instance Attribute Summary collapse
-
#count ⇒ Object
readonly
Returns the value of attribute count.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#owners ⇒ Object
readonly
Returns the value of attribute owners.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(doc) ⇒ BadgesListGamertags
constructor
A new instance of BadgesListGamertags.
Constructor Details
#initialize(doc) ⇒ BadgesListGamertags
Returns a new instance of BadgesListGamertags.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/threesixtyvoice/badges_list_gamertags.rb', line 6 def initialize(doc) @version = doc.xpath('//api/info/version').text @title = doc.xpath('//api/info/title').text @count = doc.xpath('//api/info/count').text @id = doc.xpath('//api/info/id').text @owners = doc.xpath('//api/owners/owner').map { |i| i.text } end |
Instance Attribute Details
#count ⇒ Object (readonly)
Returns the value of attribute count.
4 5 6 |
# File 'lib/threesixtyvoice/badges_list_gamertags.rb', line 4 def count @count end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/threesixtyvoice/badges_list_gamertags.rb', line 4 def id @id end |
#owners ⇒ Object (readonly)
Returns the value of attribute owners.
4 5 6 |
# File 'lib/threesixtyvoice/badges_list_gamertags.rb', line 4 def owners @owners end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
4 5 6 |
# File 'lib/threesixtyvoice/badges_list_gamertags.rb', line 4 def title @title end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
4 5 6 |
# File 'lib/threesixtyvoice/badges_list_gamertags.rb', line 4 def version @version end |