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"}, :"1.0.2" => {ofxheader: "100", version: "102"} }
Instance Attribute Summary collapse
-
#encoding ⇒ Object
readonly
Returns the value of attribute encoding.
-
#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.
19 20 21 22 23 24 25 26 |
# File 'lib/ofx/data/declaration.rb', line 19 def initialize(opts) @ofxheader = opts.fetch(:ofxheader, "NONE") @version = opts.fetch(:version, "NONE") @security = opts.fetch(:security, "NONE") @encoding = opts.fetch(:encoding, "UTF-8") @oldfileuid = opts.fetch(:oldfileuid, "NONE") @newfileuid = opts.fetch(:newfileuid, "NONE") end |
Instance Attribute Details
#encoding ⇒ Object (readonly)
Returns the value of attribute encoding.
17 18 19 |
# File 'lib/ofx/data/declaration.rb', line 17 def encoding @encoding end |
#newfileuid ⇒ Object (readonly)
Returns the value of attribute newfileuid.
17 18 19 |
# File 'lib/ofx/data/declaration.rb', line 17 def newfileuid @newfileuid end |
#ofxheader ⇒ Object (readonly)
Returns the value of attribute ofxheader.
17 18 19 |
# File 'lib/ofx/data/declaration.rb', line 17 def ofxheader @ofxheader end |
#oldfileuid ⇒ Object (readonly)
Returns the value of attribute oldfileuid.
17 18 19 |
# File 'lib/ofx/data/declaration.rb', line 17 def oldfileuid @oldfileuid end |
#security ⇒ Object (readonly)
Returns the value of attribute security.
17 18 19 |
# File 'lib/ofx/data/declaration.rb', line 17 def security @security end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
17 18 19 |
# File 'lib/ofx/data/declaration.rb', line 17 def version @version end |
Class Method Details
.[](key) ⇒ Object
9 10 11 |
# File 'lib/ofx/data/declaration.rb', line 9 def self.[](key) new(DEFAULTS.fetch(key)) end |
.default ⇒ Object
13 14 15 |
# File 'lib/ofx/data/declaration.rb', line 13 def self.default self[:"2.0.3"] end |