Class: OFX::Statement

Inherits:
Object
  • Object
show all
Defined in:
lib/ofx/statement.rb

Instance Method Summary collapse

Constructor Details

#initializeStatement

Returns a new instance of Statement.



3
4
5
# File 'lib/ofx/statement.rb', line 3

def initialize
  @accounts = {}
end

Instance Method Details

#[](key) ⇒ Object



7
8
9
10
11
# File 'lib/ofx/statement.rb', line 7

def [](key)
  # have to call to_s because the original key from ffi is a CharArray
  # (equality doesn't do what i want)
  @accounts[key.to_s]
end

#[]=(key, val) ⇒ Object



13
14
15
# File 'lib/ofx/statement.rb', line 13

def []=(key, val)
  @accounts[key.to_s] = val
end

#eachObject



17
18
19
20
21
# File 'lib/ofx/statement.rb', line 17

def each
  @accounts.each do |number, |
    yield 
  end
end