Class: FioAPI::Base
- Inherits:
-
Object
- Object
- FioAPI::Base
- Defined in:
- lib/base.rb
Direct Known Subclasses
Account, List, Payments::Domestic, Payments::Status, Request, Transaction
Instance Method Summary collapse
-
#initialize(*hash) ⇒ Base
constructor
Allow ruby object to be initialized with params.
Constructor Details
#initialize(*hash) ⇒ Base
Allow ruby object to be initialized with params
Parameters:
- hash
-
Hash where key is attribute and value is new attribute value
Returns:
New object with prefilled attributes
12 13 14 |
# File 'lib/base.rb', line 12 def initialize(*hash) hash.first.each { |k, v| send("#{k}=", v) } if hash.length == 1 && hash.first.is_a?(Hash) end |