Class: Eancom::Edifact::Body
- Inherits:
-
DocumentElement
- Object
- DocumentElement
- Eancom::Edifact::Body
- Defined in:
- lib/eancom/edifact/body.rb
Instance Attribute Summary collapse
-
#hash ⇒ Object
Returns the value of attribute hash.
-
#items ⇒ Object
Returns the value of attribute items.
-
#locations ⇒ Object
Returns the value of attribute locations.
-
#messages ⇒ Object
Returns the value of attribute messages.
Attributes inherited from DocumentElement
Instance Method Summary collapse
-
#initialize ⇒ Body
constructor
A new instance of Body.
- #start_message ⇒ Object
- #to_json_hash ⇒ Object
Methods inherited from DocumentElement
Constructor Details
#initialize ⇒ Body
Returns a new instance of Body.
8 9 10 11 12 |
# File 'lib/eancom/edifact/body.rb', line 8 def initialize super @hash = {} @messages = [] end |
Instance Attribute Details
#hash ⇒ Object
Returns the value of attribute hash.
6 7 8 |
# File 'lib/eancom/edifact/body.rb', line 6 def hash @hash end |
#items ⇒ Object
Returns the value of attribute items.
6 7 8 |
# File 'lib/eancom/edifact/body.rb', line 6 def items @items end |
#locations ⇒ Object
Returns the value of attribute locations.
6 7 8 |
# File 'lib/eancom/edifact/body.rb', line 6 def locations @locations end |
#messages ⇒ Object
Returns the value of attribute messages.
6 7 8 |
# File 'lib/eancom/edifact/body.rb', line 6 def @messages end |
Instance Method Details
#start_message ⇒ Object
18 19 20 21 22 23 |
# File 'lib/eancom/edifact/body.rb', line 18 def if @message @messages << @message.to_json_hash end @message = Eancom::Edifact::Message.new end |
#to_json_hash ⇒ Object
14 15 16 |
# File 'lib/eancom/edifact/body.rb', line 14 def to_json_hash @to_json_hash ||= build_json_hash end |