Sha256: 94902641a0ee4832e3942f3b6bb697c835914ba80cfd9da2a53bfc504f4c2164

Contents?: true

Size: 1.33 KB

Versions: 17

Compression:

Stored size: 1.33 KB

Contents

module Twitter
  class SearchResultInfo < Hash
    
    # Creates an easier to work with hash from
    # one with string-based keys
    def self.new_from_hash(hash)
      i = new
      i.merge!(hash)
      search_results = []
      i.results.each do |r|
        search_results << SearchResult.new_from_hash(r)
      end
      i.results = search_results
      i
    end
    
    def completed_in
      self['completed_in']
    end
    
    def completed_in=(val)
      self['completed_in'] = val
    end
    
    def max_id
      self['max_id']
    end
    
    def max_id=(val)
      self['max_id'] = val
    end
    
    def next_page
      self['next_page']
    end
    
    def next_page=(val)
      self['next_page'] = val
    end
    
    def page
      self['page']
    end
    
    def page=(val)
      self['page'] = val
    end
    
    def refresh_url
      self['refresh_url']
    end
    
    def refresh_url=(val)
      self['refresh_url'] = val
    end
    
    def results_per_page
      self['results_per_page']
    end
    
    def results_per_page=(val)
      self['results_per_page'] = val
    end
    
    def since_id
      self['since_id']
    end
    
    def since_id=(val)
      self['since_id'] = val
    end
    
    def results
      self['results']
    end
    
    def results=(val)
      self['results'] = val
    end
    
  end
end

Version data entries

17 entries across 17 versions & 13 rubygems

Version Path
baron-twitter-0.4.2 lib/twitter/search_result_info.rb
billymeltdown-twitter-0.4.2 lib/twitter/search_result_info.rb
billymeltdown-twitter-0.4.3 lib/twitter/search_result_info.rb
drnic-twitter-0.4.4.1 lib/twitter/search_result_info.rb
dschn-twitter-0.4.1.2 lib/twitter/search_result_info.rb
dschn-twitter-0.4.1.3 lib/twitter/search_result_info.rb
gilesbowkett-gilesbowkett-twitter-0.4.4 lib/twitter/search_result_info.rb
gilesbowkett-twitter-0.4.3 lib/twitter/search_result_info.rb
gilesbowkett-twitter-0.4.5 lib/twitter/search_result_info.rb
handcrafted-twitter-0.4.2 lib/twitter/search_result_info.rb
jnunemaker-twitter-0.4.2 lib/twitter/search_result_info.rb
jnunemaker-twitter-0.4.4 lib/twitter/search_result_info.rb
lazyatom-twitter-0.4.2.1 lib/twitter/search_result_info.rb
netshade-twitter-0.4.2.1 lib/twitter/search_result_info.rb
neufelry-twitter-0.4.2 lib/twitter/search_result_info.rb
pjdavis-twitter-0.4.2 lib/twitter/search_result_info.rb
ubermajestix-twitter-0.4.2 lib/twitter/search_result_info.rb