Class: SepaFileParser::Pain002::Base
- Inherits:
-
Object
- Object
- SepaFileParser::Pain002::Base
- Defined in:
- lib/sepa_file_parser/pain002/base.rb
Instance Attribute Summary collapse
-
#group_header ⇒ Object
readonly
Returns the value of attribute group_header.
-
#group_information_and_status ⇒ Object
readonly
Returns the value of attribute group_information_and_status.
-
#reports ⇒ Object
readonly
Returns the value of attribute reports.
-
#xml_data ⇒ Object
readonly
Returns the value of attribute xml_data.
Instance Method Summary collapse
-
#initialize(xml_data) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(xml_data) ⇒ Base
Returns a new instance of Base.
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/sepa_file_parser/pain002/base.rb', line 8 def initialize(xml_data) @xml_data = xml_data # CstmrPmtStsRpt = Customer Payment Status Report grphdr = xml_data.xpath('CstmrPmtStsRpt/GrpHdr') @group_header = SepaFileParser::GroupHeader.new(grphdr) reports = xml_data.xpath('CstmrPmtStsRpt/OrgnlPmtInfAndSts') @reports = reports.map { |x| Report.new(x) } group_information_and_status = xml_data.xpath('CstmrPmtStsRpt/OrgnlGrpInfAndSts') @group_information_and_status = GroupInformation.new(group_information_and_status) end |
Instance Attribute Details
#group_header ⇒ Object (readonly)
Returns the value of attribute group_header.
6 7 8 |
# File 'lib/sepa_file_parser/pain002/base.rb', line 6 def group_header @group_header end |
#group_information_and_status ⇒ Object (readonly)
Returns the value of attribute group_information_and_status.
6 7 8 |
# File 'lib/sepa_file_parser/pain002/base.rb', line 6 def group_information_and_status @group_information_and_status end |
#reports ⇒ Object (readonly)
Returns the value of attribute reports.
6 7 8 |
# File 'lib/sepa_file_parser/pain002/base.rb', line 6 def reports @reports end |
#xml_data ⇒ Object (readonly)
Returns the value of attribute xml_data.
6 7 8 |
# File 'lib/sepa_file_parser/pain002/base.rb', line 6 def xml_data @xml_data end |