Class: ActiveInteractor::Interactor::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/active_interactor/interactor/options.rb

Constant Summary collapse

DEFAULTS =
{
  skip_perform_callbacks: false,
  skip_rollback: false,
  skip_rollback_callbacks: false,
  validate: true,
  validate_input_context: true,
  validate_output_context: true
}.freeze

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Options

Returns a new instance of Options.



17
18
19
20
# File 'lib/active_interactor/interactor/options.rb', line 17

def initialize(options = {})
  prepared_options = DEFAULTS.merge(options.deep_dup)
  prepared_options.each_pair { |key, value| instance_variable_set(:"@#{key}", value) }
end