Class: QuickSearch::BasePresenter
- Inherits:
-
Object
- Object
- QuickSearch::BasePresenter
- Defined in:
- app/presenters/quick_search/base_presenter.rb
Overview
Presenter: base presenter.
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(object, template) ⇒ BasePresenter
constructor
A new instance of BasePresenter.
Constructor Details
#initialize(object, template) ⇒ BasePresenter
Returns a new instance of BasePresenter.
4 5 6 7 |
# File 'app/presenters/quick_search/base_presenter.rb', line 4 def initialize(object, template) @object = object @template = template end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing ⇒ Object (private)
21 22 23 |
# File 'app/presenters/quick_search/base_presenter.rb', line 21 def method_missing(*, &) @template.send(*, &) end |
Class Method Details
.presents(name) ⇒ Object
11 12 13 14 15 |
# File 'app/presenters/quick_search/base_presenter.rb', line 11 def self.presents(name) define_method(name) do @object end end |