Class: SepaFileParser::GroupHeader
- Inherits:
-
Object
- Object
- SepaFileParser::GroupHeader
- Defined in:
- lib/sepa_file_parser/general/group_header.rb
Instance Attribute Summary collapse
-
#additional_information ⇒ Object
readonly
Returns the value of attribute additional_information.
-
#creation_date_time ⇒ Object
readonly
Returns the value of attribute creation_date_time.
-
#message_id ⇒ Object
readonly
Returns the value of attribute message_id.
-
#message_pagination ⇒ Object
readonly
Returns the value of attribute message_pagination.
-
#xml_data ⇒ Object
readonly
Returns the value of attribute xml_data.
Instance Method Summary collapse
-
#initialize(xml_data) ⇒ GroupHeader
constructor
A new instance of GroupHeader.
Constructor Details
#initialize(xml_data) ⇒ GroupHeader
Returns a new instance of GroupHeader.
14 15 16 17 18 19 20 |
# File 'lib/sepa_file_parser/general/group_header.rb', line 14 def initialize(xml_data) @xml_data = xml_data @message_id = xml_data.xpath('MsgId/text()').text @creation_date_time = Time.parse(xml_data.xpath('CreDtTm/text()').text) @message_pagination = (x = xml_data.xpath('MsgPgntn')).empty? ? nil : MessagePagination.new(x) @additional_information = xml_data.xpath('AddtlInf/text()').text end |
Instance Attribute Details
#additional_information ⇒ Object (readonly)
Returns the value of attribute additional_information.
8 9 10 |
# File 'lib/sepa_file_parser/general/group_header.rb', line 8 def additional_information @additional_information end |
#creation_date_time ⇒ Object (readonly)
Returns the value of attribute creation_date_time.
8 9 10 |
# File 'lib/sepa_file_parser/general/group_header.rb', line 8 def creation_date_time @creation_date_time end |
#message_id ⇒ Object (readonly)
Returns the value of attribute message_id.
8 9 10 |
# File 'lib/sepa_file_parser/general/group_header.rb', line 8 def @message_id end |
#message_pagination ⇒ Object (readonly)
Returns the value of attribute message_pagination.
8 9 10 |
# File 'lib/sepa_file_parser/general/group_header.rb', line 8 def @message_pagination end |
#xml_data ⇒ Object (readonly)
Returns the value of attribute xml_data.
8 9 10 |
# File 'lib/sepa_file_parser/general/group_header.rb', line 8 def xml_data @xml_data end |