Module: Teckel::Operation::ClassMethods
- Defined in:
- lib/teckel/operation.rb
Instance Method Summary collapse
-
#call(input = nil) ⇒ Object
Invoke the Operation.
-
#none ⇒ Object
Convenience method for setting input, output or error to the Contracts::None value.
- #runable(settings = UNDEFINED) ⇒ Class
-
#with(settings) ⇒ Class
(also: #set)
Provide settings to the operation.
Instance Method Details
#call(input = nil) ⇒ Object
Invoke the Operation
71 72 73 |
# File 'lib/teckel/operation.rb', line 71 def call(input = nil) runable.call(input) end |
#none ⇒ Object
Convenience method for setting input, output or error to the Contracts::None value.
164 165 166 |
# File 'lib/teckel/operation.rb', line 164 def none Contracts::None end |
#runable(settings = UNDEFINED) ⇒ Class
126 127 128 129 130 131 132 133 134 |
# File 'lib/teckel/operation.rb', line 126 def runable(settings = UNDEFINED) if settings != UNDEFINED runner.new(self, settings) elsif default_settings runner.new(self, default_settings.call) else runner.new(self) end end |
#with(settings) ⇒ Class Also known as: set
111 112 113 |
# File 'lib/teckel/operation.rb', line 111 def with(settings) runable(settings_constructor.call(settings)) end |