module ActiveInteractor
An {Base interactor} is a simple, single-purpose service object. {Base Interactors} can be used to reduce the responsibility of your controllers, workers, and models and encapsulate your application's {en.wikipedia.org/wiki/Business_logic business logic}. Each {Base interactor} represents one thing that your application does.
Each {Base interactor} has it's own immutable {Context::Base context} which contains everything the {Base interactor} needs to do its work. When an {Base interactor} does its single purpose, it affects its given {Context::Base context}.
@see medium.com/@aaronmallen/activeinteractor-8557c0dc78db Basic Usage @see github.com/aaronmallen/activeinteractor/wiki Advanced Usage @see github.com/aaronmallen/activeinteractor Source Code @see github.com/aaronmallen/activeinteractor/issues Issues
## License
Copyright © 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.
Constants
- VERSION
The
ActiveInteractor
version @return [String] theActiveInteractor
version
Public Class Methods
The ActiveInteractor
configuration
@since 0.1.0
@return [Config] a {Config} instance
# File lib/active_interactor/config.rb, line 34 def self.config @config ||= ActiveInteractor::Config.new end
Configure the ActiveInteractor
gem
@since 0.1.0
@example Configure ActiveInteractor
require 'active_interactor' ActiveInteractor.configure do |config| config.logger = ::Rails.logger end
@yield [#config]
# File lib/active_interactor/config.rb, line 48 def self.configure yield config end
The logger instance to use for logging
@since 0.1.0
@return [Class] the {Config#logger config#logger} instance
# File lib/active_interactor/config.rb, line 57 def self.logger config.logger end