Class: OFX::Data::Declaration
- Inherits:
-
Object
- Object
- OFX::Data::Declaration
- Defined in:
- lib/ofx/data/declaration.rb
Constant Summary collapse
- DEFAULTS =
{ :"2.0.3" => {ofxheader: "200", version: "203"} }
Instance Attribute Summary collapse
-
#newfileuid ⇒ Object
readonly
Returns the value of attribute newfileuid.
-
#ofxheader ⇒ Object
readonly
Returns the value of attribute ofxheader.
-
#oldfileuid ⇒ Object
readonly
Returns the value of attribute oldfileuid.
-
#security ⇒ Object
readonly
Returns the value of attribute security.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(opts) ⇒ Declaration
constructor
A new instance of Declaration.
Constructor Details
#initialize(opts) ⇒ Declaration
Returns a new instance of Declaration.
18 19 20 21 22 23 24 |
# File 'lib/ofx/data/declaration.rb', line 18 def initialize(opts) @ofxheader = opts.fetch(:ofxheader, "NONE") @version = opts.fetch(:version, "NONE") @security = opts.fetch(:security, "NONE") @oldfileuid = opts.fetch(:oldfileuid, "NONE") @newfileuid = opts.fetch(:newfileuid, "NONE") end |
Instance Attribute Details
#newfileuid ⇒ Object (readonly)
Returns the value of attribute newfileuid.
16 17 18 |
# File 'lib/ofx/data/declaration.rb', line 16 def newfileuid @newfileuid end |
#ofxheader ⇒ Object (readonly)
Returns the value of attribute ofxheader.
16 17 18 |
# File 'lib/ofx/data/declaration.rb', line 16 def ofxheader @ofxheader end |
#oldfileuid ⇒ Object (readonly)
Returns the value of attribute oldfileuid.
16 17 18 |
# File 'lib/ofx/data/declaration.rb', line 16 def oldfileuid @oldfileuid end |
#security ⇒ Object (readonly)
Returns the value of attribute security.
16 17 18 |
# File 'lib/ofx/data/declaration.rb', line 16 def security @security end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
16 17 18 |
# File 'lib/ofx/data/declaration.rb', line 16 def version @version end |
Class Method Details
.[](key) ⇒ Object
8 9 10 |
# File 'lib/ofx/data/declaration.rb', line 8 def self.[](key) new(DEFAULTS.fetch(key)) end |
.default ⇒ Object
12 13 14 |
# File 'lib/ofx/data/declaration.rb', line 12 def self.default self[:"2.0.3"] end |