Module: ActiveInteractor::Interactor::Context
- Included in:
- Base
- Defined in:
- lib/active_interactor/interactor/context.rb
Overview
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#context_attribute_missing(match, *args, &block) ⇒ Object
Call #attribute_missing on the interactor instance's context instance.
-
#context_attribute_names ⇒ Object
Call #attribute_names on the interactor instance's context instance.
-
#context_errors ⇒ Object
Call #errors on the interactor instance's context instance.
-
#context_fail!(errors = nil) ⇒ Object
Call #fail! on the interactor instance's context instance.
-
#context_invalid?(context = nil) ⇒ Object
Call #invalid? on the interactor instance's context instance.
-
#context_respond_to_without_attributes?(method, include_private_methods = false) ⇒ Object
Call #respond_to_without_attributes? on the interactor instance's context instance.
-
#context_rollback! ⇒ Object
Call #rollback! on the interactor instance's context instance.
-
#context_valid?(context = nil) ⇒ Object
Call #valid? on the interactor instance's context instance.
-
#context_validate(context = nil) ⇒ Object
Call #validate on the interactor instance's context instance.
-
#context_validate!(context = nil) ⇒ Object
Call #validate! on the interactor instance's context instance.
-
#context_validates_absence_of(*attr_names) ⇒ Object
Call #validates_absence_of on the interactor instance's context instance.
-
#context_validates_acceptance_of(*attr_names) ⇒ Object
Call #validates_acceptance_of on the interactor instance's context instance.
-
#context_validates_confirmation_of(*attr_names) ⇒ Object
Call #validates_confirmation_of on the interactor instance's context instance.
-
#context_validates_exclusion_of(*attr_names) ⇒ Object
Call #validates_exclusion_of on the interactor instance's context instance.
-
#context_validates_format_of(*attr_names) ⇒ Object
Call #validates_format_of on the interactor instance's context instance.
-
#context_validates_inclusion_of(*attr_names) ⇒ Object
Call #validates_inclusion_of on the interactor instance's context instance.
-
#context_validates_length_of(*attr_names) ⇒ Object
Call #validates_length_of on the interactor instance's context instance.
-
#context_validates_numericality_of(*attr_names) ⇒ Object
Call #validates_numericality_of on the interactor instance's context instance.
-
#context_validates_presence_of(*attr_names) ⇒ Object
Call #validates_presence_of on the interactor instance's context instance.
-
#context_validates_size_of(*attr_names) ⇒ Object
Call #validates_size_of on the interactor instance's context instance.
-
#context_validates_with(*args, &block) ⇒ Object
Call #validates_with on the interactor instance's context instance.
-
#finalize_context! ⇒ Class
Mark the interactor instance as called on the instance's context instance and return the context instance.
-
#initialize(context = {}) ⇒ Base
Initialize a new instance of Base.
Instance Method Details
#context_attribute_missing(match, *args, &block) ⇒ Object
Call #attribute_missing on the interactor instance's context instance
251 252 |
# File 'lib/active_interactor/interactor/context.rb', line 251 delegate :attribute_missing, :attribute_names, :fail!, :respond_to_without_attributes?, :rollback!, to: :context, prefix: true |
#context_attribute_names ⇒ Object
Call #attribute_names on the interactor instance's context instance
251 252 |
# File 'lib/active_interactor/interactor/context.rb', line 251 delegate :attribute_missing, :attribute_names, :fail!, :respond_to_without_attributes?, :rollback!, to: :context, prefix: true |
#context_errors ⇒ Object
Call #errors on the interactor instance's context instance
289 |
# File 'lib/active_interactor/interactor/context.rb', line 289 delegate(*ActiveModel::Validations.instance_methods, to: :context, prefix: true) |
#context_fail!(errors = nil) ⇒ Object
Call #fail! on the interactor instance's context instance
251 252 |
# File 'lib/active_interactor/interactor/context.rb', line 251 delegate :attribute_missing, :attribute_names, :fail!, :respond_to_without_attributes?, :rollback!, to: :context, prefix: true |
#context_invalid?(context = nil) ⇒ Object
Call #invalid? on the interactor instance's context instance
289 |
# File 'lib/active_interactor/interactor/context.rb', line 289 delegate(*ActiveModel::Validations.instance_methods, to: :context, prefix: true) |
#context_respond_to_without_attributes?(method, include_private_methods = false) ⇒ Object
Call #respond_to_without_attributes? on the interactor instance's context instance
251 252 |
# File 'lib/active_interactor/interactor/context.rb', line 251 delegate :attribute_missing, :attribute_names, :fail!, :respond_to_without_attributes?, :rollback!, to: :context, prefix: true |
#context_rollback! ⇒ Object
Call #rollback! on the interactor instance's context instance
251 252 |
# File 'lib/active_interactor/interactor/context.rb', line 251 delegate :attribute_missing, :attribute_names, :fail!, :respond_to_without_attributes?, :rollback!, to: :context, prefix: true |
#context_valid?(context = nil) ⇒ Object
Call #valid? on the interactor instance's context instance
289 |
# File 'lib/active_interactor/interactor/context.rb', line 289 delegate(*ActiveModel::Validations.instance_methods, to: :context, prefix: true) |
#context_validate(context = nil) ⇒ Object
Call #validate on the interactor instance's context instance
289 |
# File 'lib/active_interactor/interactor/context.rb', line 289 delegate(*ActiveModel::Validations.instance_methods, to: :context, prefix: true) |
#context_validate!(context = nil) ⇒ Object
Call #validate! on the interactor instance's context instance
289 |
# File 'lib/active_interactor/interactor/context.rb', line 289 delegate(*ActiveModel::Validations.instance_methods, to: :context, prefix: true) |
#context_validates_absence_of(*attr_names) ⇒ Object
Call #validates_absence_of on the interactor instance's context instance
350 |
# File 'lib/active_interactor/interactor/context.rb', line 350 delegate(*ActiveModel::Validations::HelperMethods.instance_methods, to: :context, prefix: true) |
#context_validates_acceptance_of(*attr_names) ⇒ Object
Call #validates_acceptance_of on the interactor instance's context instance
350 |
# File 'lib/active_interactor/interactor/context.rb', line 350 delegate(*ActiveModel::Validations::HelperMethods.instance_methods, to: :context, prefix: true) |
#context_validates_confirmation_of(*attr_names) ⇒ Object
Call #validates_confirmation_of on the interactor instance's context instance
350 |
# File 'lib/active_interactor/interactor/context.rb', line 350 delegate(*ActiveModel::Validations::HelperMethods.instance_methods, to: :context, prefix: true) |
#context_validates_exclusion_of(*attr_names) ⇒ Object
Call #validates_exclusion_of on the interactor instance's context instance
350 |
# File 'lib/active_interactor/interactor/context.rb', line 350 delegate(*ActiveModel::Validations::HelperMethods.instance_methods, to: :context, prefix: true) |
#context_validates_format_of(*attr_names) ⇒ Object
Call #validates_format_of on the interactor instance's context instance
350 |
# File 'lib/active_interactor/interactor/context.rb', line 350 delegate(*ActiveModel::Validations::HelperMethods.instance_methods, to: :context, prefix: true) |
#context_validates_inclusion_of(*attr_names) ⇒ Object
Call #validates_inclusion_of on the interactor instance's context instance
350 |
# File 'lib/active_interactor/interactor/context.rb', line 350 delegate(*ActiveModel::Validations::HelperMethods.instance_methods, to: :context, prefix: true) |
#context_validates_length_of(*attr_names) ⇒ Object
Call #validates_length_of on the interactor instance's context instance
350 |
# File 'lib/active_interactor/interactor/context.rb', line 350 delegate(*ActiveModel::Validations::HelperMethods.instance_methods, to: :context, prefix: true) |
#context_validates_numericality_of(*attr_names) ⇒ Object
Call #validates_numericality_of on the interactor instance's context instance
350 |
# File 'lib/active_interactor/interactor/context.rb', line 350 delegate(*ActiveModel::Validations::HelperMethods.instance_methods, to: :context, prefix: true) |
#context_validates_presence_of(*attr_names) ⇒ Object
Call #validates_presence_of on the interactor instance's context instance
350 |
# File 'lib/active_interactor/interactor/context.rb', line 350 delegate(*ActiveModel::Validations::HelperMethods.instance_methods, to: :context, prefix: true) |
#context_validates_size_of(*attr_names) ⇒ Object
Call #validates_size_of on the interactor instance's context instance
350 |
# File 'lib/active_interactor/interactor/context.rb', line 350 delegate(*ActiveModel::Validations::HelperMethods.instance_methods, to: :context, prefix: true) |
#context_validates_with(*args, &block) ⇒ Object
Call #validates_with on the interactor instance's context instance
289 |
# File 'lib/active_interactor/interactor/context.rb', line 289 delegate(*ActiveModel::Validations.instance_methods, to: :context, prefix: true) |
#finalize_context! ⇒ Class
Mark the interactor instance as called on the instance's context instance and return the context instance.
367 368 369 370 371 |
# File 'lib/active_interactor/interactor/context.rb', line 367 def finalize_context! context.called!(self) context.resolve context end |