Module: Serega::SeregaPlugins::Presenter::ClassMethods
- Defined in:
- lib/serega/plugins/presenter/presenter.rb
Overview
Overrides class methods of included class
Instance Method Summary collapse
-
#attribute(_name, **_opts, &_block) ⇒ Object
Overrides ClassMethods#attribute method, additionally adds method to Presenter to not hit Presenter#method_missing.
Instance Method Details
#attribute(_name, **_opts, &_block) ⇒ Object
Overrides ClassMethods#attribute method, additionally adds method to Presenter to not hit Presenter#method_missing
90 91 92 93 94 |
# File 'lib/serega/plugins/presenter/presenter.rb', line 90 def attribute(_name, **_opts, &_block) super.tap do |attribute| self::Presenter.def_delegator(:__getobj__, attribute.key) unless attribute.block end end |