Module: Pakyow::Presenter::Presentable
- Included in:
- Presenter
- Defined in:
- lib/pakyow/presenter/presentable.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
6
7
8
9
10
11
12
|
# File 'lib/pakyow/presenter/presentable.rb', line 6
def method_missing(method_name, *args, &block)
if presentable?(method_name)
@presentables[args.unshift(method_name).join(":").to_sym]
else
super
end
end
|
Instance Method Details
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
14
15
16
|
# File 'lib/pakyow/presenter/presentable.rb', line 14
def respond_to_missing?(method_name, include_private = false)
presentable?(method_name) || super
end
|