Class: Yelp::Fusion::Responses::Base
- Inherits:
-
Object
- Object
- Yelp::Fusion::Responses::Base
- Defined in:
- lib/yelp/fusion/responses/base.rb
Overview
Base instance variables sent back from JSON response
Direct Known Subclasses
Business, Match, Models::Business, Models::Categories, Models::Center, Models::Hours, Models::Location, Models::OpenHours, Models::Region, Models::Reviews, Models::User, Phone, Review, Search, Transaction
Instance Method Summary collapse
-
#initialize(json) ⇒ Base
constructor
yelp returns its data in JSON format.
Constructor Details
#initialize(json) ⇒ Base
yelp returns its data in JSON format.
28 29 30 31 32 33 34 |
# File 'lib/yelp/fusion/responses/base.rb', line 28 def initialize(json) return if json.nil? json.each do |key, value| instance_variable_set("@#{key}", value) end end |