Module: Serega::SeregaPlugins::Presenter::Presenter::InstanceMethods
- Included in:
- Serega::SeregaPlugins::Presenter::Presenter
- Defined in:
- lib/serega/plugins/presenter/presenter.rb
Overview
Presenter instance methods
Instance Method Summary collapse
-
#method_missing(name, *_args, &_block) ⇒ Object
Delegates all missing methods to serialized object.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *_args, &_block) ⇒ Object
Delegates all missing methods to serialized object.
Creates delegator method after first #method_missing hit to improve performance of following serializations.
65 66 67 68 69 |
# File 'lib/serega/plugins/presenter/presenter.rb', line 65 def method_missing(name, *_args, &_block) # rubocop:disable Style/MissingRespondToMissing (base SimpleDelegator class has this method) super.tap do self.class.def_delegator :__getobj__, name end end |