Class: Controll::Executor::Controlled
- Defined in:
- lib/controll/executor/controlled.rb
Instance Attribute Summary
Attributes inherited from Assistant
Class Method Summary collapse
Instance Method Summary collapse
- #execute ⇒ Object
-
#result ⇒ Object
return last notification or :success as result return <Event>.
Methods inherited from Assistant
controller_methods, #initialize
Constructor Details
This class inherits a constructor from Controll::Assistant
Class Method Details
.execute(&block) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/controll/executor/controlled.rb', line 18 def execute &block define_method :execute do super instance_eval &block result end end |
Instance Method Details
#execute ⇒ Object
6 7 8 9 |
# File 'lib/controll/executor/controlled.rb', line 6 def execute validations do_command unless error? end |
#result ⇒ Object
return last notification or :success as result return <Event>
13 14 15 |
# File 'lib/controll/executor/controlled.rb', line 13 def result main_event end |