Class: DHLEcommerceEU::BaseObject
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- DHLEcommerceEU::BaseObject
- Defined in:
- lib/dhl_ecommerce_eu/objects/base_object.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ BaseObject
constructor
A new instance of BaseObject.
Constructor Details
#initialize(attributes = {}) ⇒ BaseObject
Returns a new instance of BaseObject.
5 6 7 8 9 10 |
# File 'lib/dhl_ecommerce_eu/objects/base_object.rb', line 5 def initialize(attributes = {}) @attributes = attributes ostruct = to_ostruct(attributes) ostruct = ostruct.empty? ? nil : ostruct super ostruct end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
3 4 5 |
# File 'lib/dhl_ecommerce_eu/objects/base_object.rb', line 3 def attributes @attributes end |