Class: Yelp::Fusion::Responses::Search

Inherits:
Base
  • Object
show all
Defined in:
lib/yelp/fusion/responses/search.rb

Overview

Class to parse the Search response JSON

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Search

Returns a new instance of Search.



33
34
35
36
37
# File 'lib/yelp/fusion/responses/search.rb', line 33

def initialize(json)
  super(json)
  @businesses = parse(@businesses, Models::Business)
  @region     = parse(@region, Models::Region)
end

Instance Attribute Details

#businessesObject (readonly)

Returns the value of attribute businesses.



32
33
34
# File 'lib/yelp/fusion/responses/search.rb', line 32

def businesses
  @businesses
end

#regionObject (readonly)

Returns the value of attribute region.



32
33
34
# File 'lib/yelp/fusion/responses/search.rb', line 32

def region
  @region
end

#totalObject (readonly)

Returns the value of attribute total.



32
33
34
# File 'lib/yelp/fusion/responses/search.rb', line 32

def total
  @total
end