Class: Pinkman::FormHelper::Dispatcher
- Inherits:
-
Object
- Object
- Pinkman::FormHelper::Dispatcher
- Defined in:
- lib/pinkman/form_helper.rb
Instance Attribute Summary collapse
-
#rails_helper ⇒ Object
Returns the value of attribute rails_helper.
Instance Method Summary collapse
-
#initialize(value) ⇒ Dispatcher
constructor
A new instance of Dispatcher.
- #method_missing(m, *args, &block) ⇒ Object
Constructor Details
#initialize(value) ⇒ Dispatcher
Returns a new instance of Dispatcher.
9 10 11 |
# File 'lib/pinkman/form_helper.rb', line 9 def initialize value @rails_helper = value end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args, &block) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/pinkman/form_helper.rb', line 13 def method_missing m, *args, &block if Pinkman::FormHelper.respond_to?(m) if block_given? rails_helper.instance_exec(*args,block,&Pinkman::FormHelper.send(m)) else rails_helper.instance_exec(*args,&Pinkman::FormHelper.send(m)) end else super(m) end end |
Instance Attribute Details
#rails_helper ⇒ Object
Returns the value of attribute rails_helper.
7 8 9 |
# File 'lib/pinkman/form_helper.rb', line 7 def rails_helper @rails_helper end |