Class: TwitterSearch::Trends
- Inherits:
-
Array
- Object
- Array
- TwitterSearch::Trends
- Defined in:
- lib/trends.rb
Constant Summary collapse
- VARS =
[:date]
Instance Method Summary collapse
-
#initialize(opts) ⇒ Trends
constructor
A new instance of Trends.
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 |