Class: Threesixtyvoice::Popular
- Inherits:
-
Object
- Object
- Threesixtyvoice::Popular
- Defined in:
- lib/threesixtyvoice/popular.rb
Instance Attribute Summary collapse
-
#popular_blogs ⇒ Object
readonly
Returns the value of attribute popular_blogs.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(doc) ⇒ Popular
constructor
A new instance of Popular.
Constructor Details
#initialize(doc) ⇒ Popular
Returns a new instance of Popular.
5 6 7 8 9 10 |
# File 'lib/threesixtyvoice/popular.rb', line 5 def initialize(doc) @version = doc.xpath('//api/info/version').text @popular_blogs = doc.xpath('//api/mostpopular/gamer').map do |i| PopularBlog.new(i.xpath('rank').text, i.xpath('gamertag').text,i.xpath('url').text) end end |
Instance Attribute Details
#popular_blogs ⇒ Object (readonly)
Returns the value of attribute popular_blogs.
3 4 5 |
# File 'lib/threesixtyvoice/popular.rb', line 3 def popular_blogs @popular_blogs end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
3 4 5 |
# File 'lib/threesixtyvoice/popular.rb', line 3 def version @version end |