Class: XmlConv::Model::Document

Inherits:
String
  • Object
show all
Defined in:
lib/xmlconv/model/document.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#filenameObject

Returns the value of attribute filename.



7
8
9
# File 'lib/xmlconv/model/document.rb', line 7

def filename
  @filename
end

#prefixObject

Returns the value of attribute prefix.



7
8
9
# File 'lib/xmlconv/model/document.rb', line 7

def prefix
  @prefix
end

#recipient_idObject

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_idObject

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_sObject



20
21
22
# File 'lib/xmlconv/model/document.rb', line 20

def to_s
  "" << self
end