Module: ServiceOperator
- Extended by:
- ServiceOperator
- Included in:
- ServiceOperator
- Defined in:
- lib/service_operator/context.rb,
lib/service_operator.rb,
lib/service_operator/step.rb,
lib/service_operator/hooks.rb,
lib/service_operator/steps.rb,
lib/service_operator/helpers.rb,
lib/service_operator/version.rb,
lib/service_operator/configuration.rb
Overview
rubocop: disable Style/OpenStructUse
Defined Under Namespace
Modules: Helpers, Hooks, Steps Classes: Configuration, Context, Step
Constant Summary collapse
- Failure =
Class.new(StandardError)
- VERSION =
'0.2.3'
Instance Method Summary collapse
- #configuration ⇒ Object
-
#configure {|configuration| ... } ⇒ Object
Examples.
-
#instance ⇒ Object
Public: Default per thread service_operator instance if configured.
Instance Method Details
#configuration ⇒ Object
10 11 12 |
# File 'lib/service_operator.rb', line 10 def configuration @configuration ||= Configuration.new end |
#configure {|configuration| ... } ⇒ Object
Examples
ServiceOperator.configure do |config|
config.call_parameters_method_name = :call_parameters
config.failure_method_name = :failure?
end
21 22 23 |
# File 'lib/service_operator.rb', line 21 def configure yield(configuration) end |
#instance ⇒ Object
Public: Default per thread service_operator instance if configured. Returns ServiceOperator::Configuration instance.
27 28 29 |
# File 'lib/service_operator.rb', line 27 def instance Thread.current[:service_operator_configuration] ||= configuration end |