Class: Threesixtyvoice::BadgesListGamertags

Inherits:
Object
  • Object
show all
Defined in:
lib/threesixtyvoice/badges_list_gamertags.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#countObject (readonly)

Returns the value of attribute count.



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

def count
  @count
end

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#ownersObject (readonly)

Returns the value of attribute owners.



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

def owners
  @owners
end

#titleObject (readonly)

Returns the value of attribute title.



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

def title
  @title
end

#versionObject (readonly)

Returns the value of attribute version.



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

def version
  @version
end