Class: Uncomtrade::Options
- Inherits:
-
Object
- Object
- Uncomtrade::Options
- Defined in:
- lib/uncomtrade/options.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Options
constructor
A new instance of Options.
- #list_options ⇒ Object
- #reset ⇒ Object
- #update(opts = {}) ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ Options
Returns a new instance of Options.
9 10 11 |
# File 'lib/uncomtrade/options.rb', line 9 def initialize(opts={}) (opts) end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/uncomtrade/options.rb', line 7 def @options end |
Instance Method Details
#list_options ⇒ Object
27 28 29 |
# File 'lib/uncomtrade/options.rb', line 27 def end |
#reset ⇒ Object
23 24 25 |
# File 'lib/uncomtrade/options.rb', line 23 def reset end |
#update(opts = {}) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/uncomtrade/options.rb', line 13 def update(opts={}) opts.each do |key, value| if [:p,:r].include?(key) self.[key] = iso_code(value) else self.[key] = value if key != :fmt # don't let user update :fmt end end end |