Module: Hexx::Services::ExecutionDSL
Overview
Module ExecutionDSL includes Informator and provides [#execute] and [#call] methods on top of it.
Instance Method Summary collapse
-
#call ⇒ <type>
The method executes the service object catches ‘:published` and returns its results.
-
#execute ⇒ undefined
abstract
Defines the sequence of commands provided by the service object.
Instance Method Details
#call ⇒ <type>
The method executes the service object catches ‘:published` and returns its results. When nothing was published it publishes `:success` event by itself.
26 27 28 29 30 |
# File 'lib/hexx-services/execution_dsl.rb', line 26 def call events = Array(catch(:published) { execute }) return events if events.first.instance_of? Event publish :success end |
#execute ⇒ undefined
This method is abstract.
Defines the sequence of commands provided by the service object
38 39 |
# File 'lib/hexx-services/execution_dsl.rb', line 38 def execute end |