Class: OFXReader::Parser::Base
- Inherits:
-
Object
- Object
- OFXReader::Parser::Base
- Defined in:
- lib/ofx_reader/parser/base.rb
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
Returns the value of attribute account.
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#header ⇒ Object
readonly
Returns the value of attribute header.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#strict ⇒ Object
readonly
Returns the value of attribute strict.
-
#transactions ⇒ Object
readonly
Returns the value of attribute transactions.
Instance Method Summary collapse
-
#initialize(content, strict: false) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(content, strict: false) ⇒ Base
Returns a new instance of Base.
11 12 13 14 15 16 17 |
# File 'lib/ofx_reader/parser/base.rb', line 11 def initialize(content, strict: false) content = content.encode("UTF-8", "ISO-8859-1") @strict = strict @header, @body = content.dup.split(/(?=<OFX>)/, 2) @headers = parse_headers(header) @account, @transactions = parse_body(body) end |
Instance Attribute Details
#account ⇒ Object (readonly)
Returns the value of attribute account.
9 10 11 |
# File 'lib/ofx_reader/parser/base.rb', line 9 def account @account end |
#body ⇒ Object (readonly)
Returns the value of attribute body.
7 8 9 |
# File 'lib/ofx_reader/parser/base.rb', line 7 def body @body end |
#header ⇒ Object (readonly)
Returns the value of attribute header.
7 8 9 |
# File 'lib/ofx_reader/parser/base.rb', line 7 def header @header end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
9 10 11 |
# File 'lib/ofx_reader/parser/base.rb', line 9 def headers @headers end |
#strict ⇒ Object (readonly)
Returns the value of attribute strict.
8 9 10 |
# File 'lib/ofx_reader/parser/base.rb', line 8 def strict @strict end |
#transactions ⇒ Object (readonly)
Returns the value of attribute transactions.
9 10 11 |
# File 'lib/ofx_reader/parser/base.rb', line 9 def transactions @transactions end |