Class: Stave::Core::OptionMerger
- Inherits:
-
Object
- Object
- Stave::Core::OptionMerger
- Defined in:
- lib/stave/core/option_merger.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(context, options) ⇒ OptionMerger
constructor
A new instance of OptionMerger.
Constructor Details
#initialize(context, options) ⇒ OptionMerger
Returns a new instance of OptionMerger.
6 7 8 9 |
# File 'lib/stave/core/option_merger.rb', line 6 def initialize(context, ) @context = context @options = end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, **kwargs) ⇒ Object (private)
13 14 15 16 17 18 |
# File 'lib/stave/core/option_merger.rb', line 13 def method_missing(method, *args, **kwargs, &) kwargs ||= {} kwargs = kwargs.merge() unless .empty? context.send(method, *args, **kwargs, &) end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
4 5 6 |
# File 'lib/stave/core/option_merger.rb', line 4 def context @context end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/stave/core/option_merger.rb', line 4 def @options end |