Module: Lotus::Presenter
- Defined in:
- lib/lotus/presenter.rb
Overview
Presenter pattern implementation
Instance Method Summary collapse
-
#initialize(object) ⇒ Object
Initialize the presenter.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args, &blk) ⇒ Object (protected)
62 63 64 65 66 67 68 |
# File 'lib/lotus/presenter.rb', line 62 def method_missing(m, *args, &blk) if @object.respond_to?(m) @object.__send__ m, *args, &blk else super end end |
Instance Method Details
#initialize(object) ⇒ Object
Initialize the presenter
57 58 59 |
# File 'lib/lotus/presenter.rb', line 57 def initialize(object) @object = object end |