Method: Datacash::Response::Base#initialize
- Defined in:
- lib/datacash/response/base.rb
#initialize(attributes = {}) ⇒ Base
Returns a new instance of Base.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/datacash/response/base.rb', line 8 def initialize(attributes = {}) self.class.keys.each do |key, | next unless .has_key?(:from) from = [:from].to_sym if attributes.has_key?(from) attributes[key] = attributes.delete(from) end end super(attributes) end |