Module: ActiveInteractor

Extended by:
ActiveSupport::Autoload
Defined in:
lib/active_interactor.rb,
lib/active_interactor/base.rb,
lib/active_interactor/context.rb,
lib/active_interactor/version.rb,
lib/active_interactor/organizer.rb,
lib/active_interactor/interactor.rb,
lib/active_interactor/configuration.rb,
lib/active_interactor/interactor/worker.rb,
lib/active_interactor/interactor/context.rb,
lib/active_interactor/interactor/callbacks.rb,
lib/active_interactor/interactor/execution.rb

Overview

Copyright (c) 2019 Aaron Allen

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Author:

Since:

  • 0.0.1

Version:

  • 0.1

Defined Under Namespace

Modules: Context, Interactor Classes: Base, Configuration, Organizer

Constant Summary collapse

VERSION =

The ActiveInteractor gem version

Returns:

  • (String)

    the gem version

Since:

  • 0.0.1

'0.1.0'

Class Method Summary collapse

Class Method Details

.configurationActiveInteractor::Configuration

The ActiveInteractor configuration

Returns:

Since:

  • 0.0.1


41
42
43
# File 'lib/active_interactor.rb', line 41

def configuration
  @configuration ||= Configuration.new
end

.configure {|ActiveInteractor#configuration| ... } ⇒ Object

Configures the ActiveInteractor gem

Examples:

Configure ActiveInteractor

ActiveInteractor.configure do |config|
  config.logger = Rails.logger
end

Yields:

Since:

  • 0.0.1


53
54
55
# File 'lib/active_interactor.rb', line 53

def configure
  yield(configuration)
end

.loggerLogger

The ActiveInteractor logger object

Returns:

  • (Logger)

    the configured logger instance

Since:

  • 0.0.1


59
60
61
# File 'lib/active_interactor.rb', line 59

def logger
  configuration.logger
end