Class: Yelp::Response::Search

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Search

Returns a new instance of Search.



10
11
12
13
14
15
# File 'lib/yelp/responses/search.rb', line 10

def initialize(json)
  super(json)

  @businesses = parse(@businesses, Model::Business)
  @region     = parse(@region, Model::Region)
end

Instance Attribute Details

#businessesObject (readonly)

Returns the value of attribute businesses.



8
9
10
# File 'lib/yelp/responses/search.rb', line 8

def businesses
  @businesses
end

#regionObject (readonly)

Returns the value of attribute region.



8
9
10
# File 'lib/yelp/responses/search.rb', line 8

def region
  @region
end

#totalObject (readonly)

Returns the value of attribute total.



8
9
10
# File 'lib/yelp/responses/search.rb', line 8

def total
  @total
end