Class: Usps::Imis::BlankObject
- Inherits:
-
Object
- Object
- Usps::Imis::BlankObject
- Defined in:
- lib/usps/imis/blank_object.rb
Overview
Constructor for blank BusinessObject and BasePanel objects
Instance Attribute Summary collapse
-
#parent ⇒ Object
readonly
The parent object.
Instance Method Summary collapse
-
#build(hash = {}) {|| ... } ⇒ Object
Build a blank object for the current iMIS ID.
-
#initialize(parent, ordinal = nil) ⇒ BlankObject
constructor
A new instance of BlankObject.
Constructor Details
#initialize(parent, ordinal = nil) ⇒ BlankObject
Returns a new instance of BlankObject.
16 17 18 19 |
# File 'lib/usps/imis/blank_object.rb', line 16 def initialize(parent, ordinal = nil) @parent = parent @ordinal = ordinal end |
Instance Attribute Details
#parent ⇒ Object (readonly)
The parent object
14 15 16 |
# File 'lib/usps/imis/blank_object.rb', line 14 def parent @parent end |
Instance Method Details
#build(hash = {}) {|| ... } ⇒ Object
Build a blank object for the current iMIS ID
27 |
# File 'lib/usps/imis/blank_object.rb', line 27 def build(hash = {}, &) = header.merge(Properties.build(parent.api.record_id.to_s, @ordinal&.to_s, hash, &)) |