Class: Twitter::Trends
- Inherits:
-
Object
- Object
- Twitter::Trends
- Includes:
- Enumerable, HTTParty
- Defined in:
- lib/twitter/trends.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
6 7 8 |
# File 'lib/twitter/trends.rb', line 6 def result @result end |
Instance Method Details
#each ⇒ Object
14 15 16 |
# File 'lib/twitter/trends.rb', line 14 def each fetch()['trends'].each { |r| yield r } end |
#fetch ⇒ Object
8 9 10 11 12 |
# File 'lib/twitter/trends.rb', line 8 def fetch response = self.class.get('http://search.twitter.com/trends.json', :format => :json) @fetch = Mash.new(response) @fetch end |