Class: Yelp::Response::Base

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

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Base

Returns a new instance of Base.



4
5
6
7
8
9
10
# File 'lib/yelp/responses/base.rb', line 4

def initialize(json)
  return if json.nil?

  json.each do |key, value|
    instance_variable_set("@#{key}", value)
  end
end