Class: OFX::Tokenizer::Base
- Inherits:
-
Object
- Object
- OFX::Tokenizer::Base
- Defined in:
- lib/ofx_kit/tokenizer/base.rb
Overview
Abstract base class for OFX tokenizers. Subclasses must implement #parse! to populate @headers and @body from the raw file content.
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(content) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(content) ⇒ Base
Returns a new instance of Base.
14 15 16 17 |
# File 'lib/ofx_kit/tokenizer/base.rb', line 14 def initialize(content) @content = content.dup.force_encoding('UTF-8') parse! end |
Instance Attribute Details
#body ⇒ Hash, Nokogiri::XML::Document (readonly)
11 12 13 |
# File 'lib/ofx_kit/tokenizer/base.rb', line 11 def body @body end |
#headers ⇒ Hash, Nokogiri::XML::Document (readonly)
11 12 13 |
# File 'lib/ofx_kit/tokenizer/base.rb', line 11 def headers @headers end |