Module: Teckel::Operation::InstanceMethods
- Defined in:
- lib/teckel/operation.rb
Instance Attribute Summary collapse
-
#settings() ⇒ Class?
readonly
When executed with settings, an instance of the configured settings class.
Instance Method Summary collapse
-
#call(input) ⇒ Object
abstract
The entry point for your operation.
-
#fail!(*args) ⇒ Object
protected
Delegates to the configured Runner.
-
#success!(*args) ⇒ Object
protected
Delegates to the configured Runner.
Instance Attribute Details
#settings() ⇒ Class? (readonly)
Returns When executed with settings, an instance of the configured settings class. Otherwise nil.
|
|
# File 'lib/teckel/operation.rb', line 181
|
Instance Method Details
#call(input) ⇒ Object
The entry point for your operation. It needs to always accept an input value, even when using input none. If your Operation expects to generate success or failure outputs, you need to use either #success! or #fail! respectively. Simple return values will get ignored by default. See Config#runner and Runner on how to overwrite.
|
|
# File 'lib/teckel/operation.rb', line 170
|
#fail!(*args) ⇒ Object (protected)
Delegates to the configured Runner. The default behavior is to halt any further execution with an error value.
201 202 203 |
# File 'lib/teckel/operation.rb', line 201 def fail!(*args) runner.fail!(*args) end |
#success!(*args) ⇒ Object (protected)
Delegates to the configured Runner. The default behavior is to halt any further execution with a output value.
192 193 194 |
# File 'lib/teckel/operation.rb', line 192 def success!(*args) runner.success!(*args) end |