Class: Egg::Parser
- Inherits:
-
Object
- Object
- Egg::Parser
- Defined in:
- lib/egg/parser.rb
Defined Under Namespace
Classes: UnparsableHtmlError
Instance Method Summary collapse
-
#initialize(html) ⇒ Parser
constructor
A new instance of Parser.
- #to_ofx ⇒ Object
Constructor Details
#initialize(html) ⇒ Parser
Returns a new instance of Parser.
16 17 18 19 20 21 22 23 24 |
# File 'lib/egg/parser.rb', line 16 def initialize(html) if html =~ /your egg card statement/i @parser = StatementDocumentParser.new(html) elsif html =~ /egg card recent transactions/i @parser = RecentTransactionsDocumentParser.new(html) else raise UnparsableHtmlError end end |
Instance Method Details
#to_ofx ⇒ Object
26 27 28 |
# File 'lib/egg/parser.rb', line 26 def to_ofx @parser.to_ofx end |