Class: XmlConv::Model::Document
- Inherits:
-
String
- Object
- String
- XmlConv::Model::Document
- Defined in:
- lib/xmlconv/model/document.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#prefix ⇒ Object
Returns the value of attribute prefix.
-
#recipient_id ⇒ Object
Returns the value of attribute recipient_id.
-
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Document
constructor
A new instance of Document.
- #to_s ⇒ Object
Constructor Details
#initialize(*args) ⇒ Document
Returns a new instance of Document.
8 9 10 11 12 13 14 15 |
# File 'lib/xmlconv/model/document.rb', line 8 def initialize(*args) super @recipient_id = recipient_id @prefix = @recipient_id time = Time.now msec = sprintf('%03i', (time.to_f * 1000).to_i % 100) @transaction_id = time.strftime("%Y%m%d%H%M%S#{msec}") end |
Instance Attribute Details
#filename ⇒ Object
Returns the value of attribute filename.
7 8 9 |
# File 'lib/xmlconv/model/document.rb', line 7 def filename @filename end |
#prefix ⇒ Object
Returns the value of attribute prefix.
7 8 9 |
# File 'lib/xmlconv/model/document.rb', line 7 def prefix @prefix end |
#recipient_id ⇒ Object
Returns the value of attribute recipient_id.
7 8 9 |
# File 'lib/xmlconv/model/document.rb', line 7 def recipient_id @recipient_id end |
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
7 8 9 |
# File 'lib/xmlconv/model/document.rb', line 7 def transaction_id @transaction_id end |
Instance Method Details
#to_s ⇒ Object
20 21 22 |
# File 'lib/xmlconv/model/document.rb', line 20 def to_s "" << self end |