Class: Cryptoprocessing::APIObject
- Inherits:
-
Hash
- Object
- Hash
- Cryptoprocessing::APIObject
- Defined in:
- lib/cryptoprocessing/models/api_object.rb
Instance Method Summary collapse
-
#initialize(client, data) ⇒ APIObject
constructor
A new instance of APIObject.
- #update(data) ⇒ Object
Constructor Details
#initialize(client, data) ⇒ APIObject
Returns a new instance of APIObject.
3 4 5 6 7 |
# File 'lib/cryptoprocessing/models/api_object.rb', line 3 def initialize(client, data) super() update(data) @client = client end |
Instance Method Details
#update(data) ⇒ Object
9 10 11 12 |
# File 'lib/cryptoprocessing/models/api_object.rb', line 9 def update(data) return if data.nil? data.each {|key, val| self[key] = val} if data.is_a?(Hash) end |