Class: CamtParser::GroupHeader

Inherits:
Object
  • Object
show all
Defined in:
lib/camt_parser/general/group_header.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_informationObject (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_timeObject (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_idObject (readonly)

Returns the value of attribute message_id.



5
6
7
# File 'lib/camt_parser/general/group_header.rb', line 5

def message_id
  @message_id
end

#message_paginationObject (readonly)

Returns the value of attribute message_pagination.



5
6
7
# File 'lib/camt_parser/general/group_header.rb', line 5

def message_pagination
  @message_pagination
end