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.
-
#with(input) ⇒ Class
(also: #set)
Provide settings to the running operation.
Instance Method Details
#call(input = nil) ⇒ Object
Invoke the Operation
68 69 70 71 72 73 74 75 76 |
# File 'lib/teckel/operation.rb', line 68 def call(input = nil) default_settings = self.default_settings if default_settings runner.new(self, default_settings.call) else runner.new(self) end.call(input) end |
#none ⇒ Object
Convenience method for setting input, output or error to the Contracts::None value.
147 148 149 |
# File 'lib/teckel/operation.rb', line 147 def none Teckel::Contracts::None end |
#with(input) ⇒ Class Also known as: set
114 115 116 |
# File 'lib/teckel/operation.rb', line 114 def with(input) runner.new(self, settings_constructor.call(input)) end |