Class: QuickSearch::BasePresenter
- Inherits:
-
Object
- Object
- QuickSearch::BasePresenter
- Defined in:
- app/presenters/quick_search/base_presenter.rb
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.
3 4 5 6 |
# File 'app/presenters/quick_search/base_presenter.rb', line 3 def initialize(object, template) @object = object @template = template end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object (private)
20 21 22 |
# File 'app/presenters/quick_search/base_presenter.rb', line 20 def method_missing(*args, &block) @template.send(*args, &block) end |
Class Method Details
.presents(name) ⇒ Object
10 11 12 13 14 |
# File 'app/presenters/quick_search/base_presenter.rb', line 10 def self.presents(name) define_method(name) do @object end end |