Class: CamtParser::GroupHeader
- Inherits:
-
Object
- Object
- CamtParser::GroupHeader
- Defined in:
- lib/camt_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.
12 13 14 15 16 17 18 |
# File 'lib/camt_parser/general/group_header.rb', line 12 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.
6 7 8 |
# File 'lib/camt_parser/general/group_header.rb', line 6 def additional_information @additional_information end |
#creation_date_time ⇒ Object (readonly)
Returns the value of attribute creation_date_time.
6 7 8 |
# File 'lib/camt_parser/general/group_header.rb', line 6 def creation_date_time @creation_date_time end |
#message_id ⇒ Object (readonly)
Returns the value of attribute message_id.
6 7 8 |
# File 'lib/camt_parser/general/group_header.rb', line 6 def @message_id end |
#message_pagination ⇒ Object (readonly)
Returns the value of attribute message_pagination.
6 7 8 |
# File 'lib/camt_parser/general/group_header.rb', line 6 def @message_pagination end |
#xml_data ⇒ Object (readonly)
Returns the value of attribute xml_data.
6 7 8 |
# File 'lib/camt_parser/general/group_header.rb', line 6 def xml_data @xml_data end |