Class: Etna::Clients::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/etna/clients/models.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw = {}) ⇒ Response

Returns a new instance of Response.



14
15
16
# File 'lib/etna/clients/models.rb', line 14

def initialize(raw = {})
  @raw = raw || {}
end

Instance Attribute Details

#rawObject (readonly)

Returns the value of attribute raw.



4
5
6
# File 'lib/etna/clients/models.rb', line 4

def raw
  @raw
end

Class Method Details

.params(*params) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/etna/clients/models.rb', line 6

def self.params(*params)
  params.each do |param|
    self.define_method param do
      @raw[param]
    end
  end
end