lib/gateway/Parsers/header_parser.rb in stone_ecommerce-1.2.4 vs lib/gateway/Parsers/header_parser.rb in stone_ecommerce-1.3.0

- old
+ new

@@ -1,17 +1,17 @@ -module Gateway - - class HeaderParser - def Parse(elements) - if elements.length < 4 - throw('The expected parameter count is 4') - end - - header = Header.new - header.TransactionProcessedDate = Date.parse(elements[1]).strftime('%Y%m%d') - header.ReportFileCreateDate = Date.parse(elements[2]).strftime('%Y%m%d %H:%M:%S') - header.Version = elements[3].chomp - - return header - end - end +module Gateway + + class HeaderParser + def Parse(elements) + if elements.length < 4 + throw('The expected parameter count is 4') + end + + header = Header.new + header.TransactionProcessedDate = Date.parse(elements[1]).strftime('%Y%m%d') + header.ReportFileCreateDate = Date.parse(elements[2]).strftime('%Y%m%d %H:%M:%S') + header.Version = elements[3].chomp + + return header + end + end end \ No newline at end of file