Class: TwitterSearch::Trends

Inherits:
Array
  • Object
show all
Defined in:
lib/trends.rb

Constant Summary collapse

VARS =
[:date]

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ Trends

Returns a new instance of Trends.



17
18
19
20
21
22
# File 'lib/trends.rb', line 17

def initialize(opts)
  trends = opts('trends').delete
  trends = trends.values.first.collect { |each| Trend.new(each) }
  super(trends)
  VARS.each { |each| instance_variable_set "@#{each}", opts[each.to_s] }
end