Class: OFXReader::Parser::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/ofx_reader/parser/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#accountObject (readonly)

Returns the value of attribute account.



9
10
11
# File 'lib/ofx_reader/parser/base.rb', line 9

def 
  @account
end

#bodyObject (readonly)

Returns the value of attribute body.



7
8
9
# File 'lib/ofx_reader/parser/base.rb', line 7

def body
  @body
end

#headerObject (readonly)

Returns the value of attribute header.



7
8
9
# File 'lib/ofx_reader/parser/base.rb', line 7

def header
  @header
end

#headersObject (readonly)

Returns the value of attribute headers.



9
10
11
# File 'lib/ofx_reader/parser/base.rb', line 9

def headers
  @headers
end

#strictObject (readonly)

Returns the value of attribute strict.



8
9
10
# File 'lib/ofx_reader/parser/base.rb', line 8

def strict
  @strict
end

#transactionsObject (readonly)

Returns the value of attribute transactions.



9
10
11
# File 'lib/ofx_reader/parser/base.rb', line 9

def transactions
  @transactions
end