Class: XmlConv::I2::Document
- Inherits:
-
Object
- Object
- XmlConv::I2::Document
- Defined in:
- lib/xmlconv/i2/document.rb
Instance Attribute Summary collapse
-
#header ⇒ Object
Returns the value of attribute header.
-
#orders ⇒ Object
readonly
Returns the value of attribute orders.
Instance Method Summary collapse
- #add_order(order) ⇒ Object
- #filename ⇒ Object
-
#initialize ⇒ Document
constructor
A new instance of Document.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ Document
Returns a new instance of Document.
12 13 14 15 |
# File 'lib/xmlconv/i2/document.rb', line 12 def initialize @header = Header.new @orders = [] end |
Instance Attribute Details
#header ⇒ Object
Returns the value of attribute header.
10 11 12 |
# File 'lib/xmlconv/i2/document.rb', line 10 def header @header end |
#orders ⇒ Object (readonly)
Returns the value of attribute orders.
11 12 13 |
# File 'lib/xmlconv/i2/document.rb', line 11 def orders @orders end |
Instance Method Details
#add_order(order) ⇒ Object
16 17 18 |
# File 'lib/xmlconv/i2/document.rb', line 16 def add_order(order) @orders.push(order) end |
#filename ⇒ Object
19 20 21 |
# File 'lib/xmlconv/i2/document.rb', line 19 def filename @header.filename end |
#to_s ⇒ Object
22 23 24 |
# File 'lib/xmlconv/i2/document.rb', line 22 def to_s ([@header] + @orders).join end |