Class: AlmaApi::Object
- Inherits:
-
MightyStruct
- Object
- MightyStruct
- AlmaApi::Object
- Defined in:
- lib/alma_api/object.rb
Instance Method Summary collapse
-
#initialize(object) ⇒ Object
constructor
A new instance of Object.
Constructor Details
#initialize(object) ⇒ Object
Returns a new instance of Object.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/alma_api/object.rb', line 5 def initialize(object) if object.is_a?(Hash) object.each do |_key, _value| if _value.is_a?(String) && _value[/\A\d\d\d\d-\d\d-\d\d\w.*/] object[_key] = Date.parse(_value) end end end super(object) end |