Class: Rectify::Presenter
- Inherits:
-
Object
- Object
- Rectify::Presenter
show all
- Defined in:
- lib/rectify/presenter.rb
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
10
11
12
13
14
15
16
|
# File 'lib/rectify/presenter.rb', line 10
def method_missing(method_name, *args, &block)
if view_context.respond_to?(method_name)
view_context.public_send(method_name, *args, &block)
else
super
end
end
|
Instance Method Details
#attach_controller(controller) ⇒ Object
5
6
7
8
|
# File 'lib/rectify/presenter.rb', line 5
def attach_controller(controller)
@controller = controller
self
end
|
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
18
19
20
|
# File 'lib/rectify/presenter.rb', line 18
def respond_to_missing?(method_name, include_private = false)
view_context.respond_to?(method_name, include_private)
end
|