Module: ChainOptions::Integration::ClassMethods
- Defined in:
- lib/chain_options/integration.rb
Instance Method Summary collapse
- #available_chain_options ⇒ Object
-
#chain_option(name, **options) ⇒ Object
Generates a combined getter and setter method for the option with the given name.
Instance Method Details
#available_chain_options ⇒ Object
59 60 61 |
# File 'lib/chain_options/integration.rb', line 59 def @available_chain_options ||= {} end |
#chain_option(name, **options) ⇒ Object
Generates a combined getter and setter method for the option with the given name.
49 50 51 52 53 54 55 56 57 |
# File 'lib/chain_options/integration.rb', line 49 def chain_option(name, **) [name.to_sym] = ChainOptions::OptionSet.handle_warnings(name, **) define_method(name) do |*args, &block| chain_option_set.handle_option_call(name, *args, &block) end end |