Module: Mountable::MountableHelper
- Defined in:
- lib/mountable/lib/mountable/mountable_helper.rb
Overview
:nodoc:
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/mountable/lib/mountable/mountable_helper.rb', line 6 def method_missing(method, *args, &block) if respond_to_missing?(method, args) main_app.send(method, *args) else super end end |
Instance Method Details
#respond_to_missing?(method) ⇒ Boolean
14 15 16 |
# File 'lib/mountable/lib/mountable/mountable_helper.rb', line 14 def respond_to_missing?(method, *) (method.to_s.end_with?('_path', '_url') && main_app.respond_to?(method)) || super end |