Module: SmoothOperator::Options
- Included in:
- OpenStruct
- Defined in:
- lib/smooth_operator/options.rb
Instance Method Summary collapse
- #config_options ⇒ Object
- #get_option(option, default, *args) ⇒ Object
- #smooth_operator_options(options = {}) ⇒ Object (also: #options)
Instance Method Details
#config_options ⇒ Object
19 20 21 |
# File 'lib/smooth_operator/options.rb', line 19 def Helpers.get_instance_variable(self, :config_options, {}) end |
#get_option(option, default, *args) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/smooth_operator/options.rb', line 4 def get_option(option, default, *args) return default unless .include?(option) _option = [option] case _option when Symbol respond_to?(_option) ? send(_option, *args) : _option when Proc _option.call(*args) else _option end end |
#smooth_operator_options(options = {}) ⇒ Object Also known as: options
23 24 25 |
# File 'lib/smooth_operator/options.rb', line 23 def ( = {}) .merge!() end |