Module: Serega::SeregaPlugins::Presenter::ClassMethods
- Defined in:
- lib/serega/plugins/presenter/presenter.rb
Overview
Serega additional/patched class methods
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
94 95 96 97 98 |
# File 'lib/serega/plugins/presenter/presenter.rb', line 94 def attribute(_name, **_opts, &_block) super.tap do |attribute| self::Presenter.def_delegator(:__getobj__, attribute.key) unless attribute.block end end |