Class: Nuncium::Responses::DataBox

Inherits:
Body
  • Object
show all
Defined in:
lib/nuncium/responses/data_box.rb

Constant Summary collapse

REMOVED_KEYS =
%w[xmlns:p xmlns:xsi dbStatus].freeze

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ DataBox

Returns a new instance of DataBox.



6
7
8
9
10
11
# File 'lib/nuncium/responses/data_box.rb', line 6

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