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.
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.
7 8 9 10 11 12 |
# File 'lib/camt_parser/general/group_header.rb', line 7 def initialize(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.
5 6 7 |
# File 'lib/camt_parser/general/group_header.rb', line 5 def additional_information @additional_information end |
#creation_date_time ⇒ Object (readonly)
Returns the value of attribute creation_date_time.
5 6 7 |
# File 'lib/camt_parser/general/group_header.rb', line 5 def creation_date_time @creation_date_time end |
#message_id ⇒ Object (readonly)
Returns the value of attribute message_id.
5 6 7 |
# File 'lib/camt_parser/general/group_header.rb', line 5 def @message_id end |
#message_pagination ⇒ Object (readonly)
Returns the value of attribute message_pagination.
5 6 7 |
# File 'lib/camt_parser/general/group_header.rb', line 5 def @message_pagination end |