class Trendious::Search

Attributes

response[R]

Public Class Methods

new(res) click to toggle source
# File lib/trendious/search.rb, line 5
def initialize(res)
  @response = JSON.parse(res)
end

Public Instance Methods

entries() click to toggle source
# File lib/trendious/search.rb, line 9
def entries
  @response['search'].map {|h| Post.new h }
end
total() click to toggle source
# File lib/trendious/search.rb, line 13
def total
  @response['total']
end