Class: RubyIsds::Responses::Body

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby_isds/responses/body.rb

Direct Known Subclasses

DataBox, Db::Body, Dm::Body

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Body

Returns a new instance of Body.



4
5
6
7
8
9
# File 'lib/ruby_isds/responses/body.rb', line 4

def initialize(response)
  (response.keys - self.class::REMOVED_KEYS).each do |key|
    self.class.send(:attr_accessor, key.to_sym)
    instance_variable_set("@#{key}", parsed_value(response[key]))
  end
end