Class: RBEDI::Parser
- Inherits:
-
Object
- Object
- RBEDI::Parser
- Defined in:
- lib/rbedi/parser.rb
Instance Method Summary collapse
-
#initialize(edi_data, fragment: false, separator: nil) ⇒ Parser
constructor
A new instance of Parser.
- #parse ⇒ Object
Constructor Details
#initialize(edi_data, fragment: false, separator: nil) ⇒ Parser
Returns a new instance of Parser.
3 4 5 6 7 |
# File 'lib/rbedi/parser.rb', line 3 def initialize(edi_data, fragment: false, separator: nil) @edi_data = edi_data @fragment = fragment @separator = separator end |
Instance Method Details
#parse ⇒ Object
9 10 11 12 13 14 |
# File 'lib/rbedi/parser.rb', line 9 def parse segments = to_segments return segments.map{|s|Segment.parse(s, separator: @separator)} if @fragment generate_transaction(segments) end |