Class: TwitterSearch::Tweets
- Inherits:
-
Array
- Object
- Array
- TwitterSearch::Tweets
- Defined in:
- lib/tweets.rb
Constant Summary collapse
- VARS =
[:since_id, :max_id, :results_per_page, :page, :query, :next_page]
Instance Method Summary collapse
- #get_next_page ⇒ Object
- #has_next_page? ⇒ Boolean
-
#initialize(opts) ⇒ Tweets
constructor
A new instance of Tweets.
Constructor Details
#initialize(opts) ⇒ Tweets
Returns a new instance of Tweets.
17 18 19 20 21 22 |
# File 'lib/tweets.rb', line 17 def initialize(opts) results = opts.delete('results') || [] results.collect! { |each| Tweet.new(each) } super(results) VARS.each { |each| instance_variable_set "@#{each}", opts[each.to_s] } end |