Class: OFXRB::OfxObject

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

Direct Known Subclasses

CreditCardStatement, Transaction

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.ofx_attrs(mapping) ⇒ Object

Maps humane attr_readers to the element names of the OFX specification.



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

def self.ofx_attrs(mapping)
  mapping.each do |humane, ofx_name|
    module_eval "def #{humane.to_s}; self['#{ofx_name}']; end"
  end
end

Instance Method Details

#[](key) ⇒ Object

Provides access to properties via their actual names in the OFX spec.



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

def [](key)
  @properties[key]
end