Class: Yelp::Fusion::Responses::Base

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

Overview

Base instance variables sent back from JSON response

Instance Method Summary collapse

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