Class: AxTrack::Asset

Inherits:
Object
  • Object
show all
Defined in:
lib/ax_track/objects/asset.rb

Instance Method Summary collapse

Methods inherited from Object

#create_getters

Constructor Details

#initialize(json_response) ⇒ Asset

Returns a new instance of Asset.



4
5
6
7
8
9
10
11
# File 'lib/ax_track/objects/asset.rb', line 4

def initialize(json_response)
  # for each key create an own instance variable with a getter
  json_response.each do |key, value|
    instance_variable_set "@#{key}", value
  end

  create_getters
end