Class: ActiveInteractor::Context::Base
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- ActiveInteractor::Context::Base
- Extended by:
- Attributes::ClassMethods
- Includes:
- Attributes, Errors, Status, ActiveModel::Attributes, ActiveModel::Validations
- Defined in:
- lib/active_interactor/context/base.rb
Overview
Class Method Summary collapse
- .attribute(name, type = Type::Value.new, **options) ⇒ Object
- .attribute_method?(attribute) ⇒ Object
- .attribute_missing(match, *args, &block) ⇒ Object
- .attribute_names ⇒ Object
-
.attributes(*attributes) ⇒ Array<Symbol>
extended
from Attributes::ClassMethods
Get or set attributes on a context class.
- .clear_validators!(attribute) ⇒ Object
- .method_missing(method, *args, &block) ⇒ Object
- .respond_to?(method, include_private_methods = false) ⇒ Object
- .respond_to_without_attributes?(method, include_private_methods = false) ⇒ Object
- .validate(*args, &block) ⇒ Object
- .validates(*attributes) ⇒ Object
- .validates!(*attributes) ⇒ Object
- .validates_absence_of(*attr_names) ⇒ Object
- .validates_acceptance_of(*attr_names) ⇒ Object
- .validates_confirmation_of(*attr_names) ⇒ Object
- .validates_each(*attr_names, &block) ⇒ Object
- .validates_exclusion_of(*attr_names) ⇒ Object
- .validates_format_of(*attr_names) ⇒ Object
- .validates_inclusion_of(*attr_names) ⇒ Object
- .validates_length_of(*attr_names) ⇒ Object
- .validates_numericality_of(*attr_names) ⇒ Object
- .validates_presence_of(*attr_names) ⇒ Object
- .validates_size_of(*attr_names) ⇒ Object
- .validates_with(*args, &block) ⇒ Object
- .validators ⇒ Object
- .validators_on(*attributes) ⇒ Object
Instance Method Summary collapse
-
#[](name) ⇒ Object
included
from Attributes
Returns the value of an attribute.
-
#[]=(name, value) ⇒ Object
included
from Attributes
Sets value of a Hash attribute in context.attributes.
-
#attribute?(attr_name) ⇒ Boolean
(also: #has_attribute?)
included
from Attributes
Check if the context instance has an attribute.
- #attribute_missing(match, *args, &block) ⇒ Object
- #attribute_names ⇒ Object
-
#attributes ⇒ Hash{Symbol => *}
included
from Attributes
Get values defined on the instance of context whose keys are defined on the context class' .attributes.
-
#called!(interactor) ⇒ Array<Class>
included
from Status
Add an instance of interactor to the list of interactors called on the context.
- #errors ⇒ Object
-
#fail!(errors = nil) ⇒ Object
included
from Status
Fail the context instance.
- #failure? ⇒ Boolean (also: #fail?) included from Status
-
#failure_errors ⇒ ActiveModel::Errors
included
from Errors
private
Generic errors generated outside of validation.
-
#initialize(context = {}) ⇒ Base
included
from Attributes
Initialize a new instance of Base.
- #invalid?(context = nil) ⇒ Object
- #merge!(context) ⇒ self included from Attributes
- #method_missing(method, *args, &block) ⇒ Object
-
#resolve ⇒ self
included
from Status
Resolve an instance of context.
- #respond_to?(method, include_private_methods = false) ⇒ Object
- #respond_to_without_attributes?(method, include_private_methods = false) ⇒ Object
- #rollback! ⇒ Boolean included from Status
-
#success? ⇒ Boolean
(also: #successful?)
included
from Status
Whether the context instance is successful.
- #valid?(context = nil) ⇒ Object
- #validate(context = nil) ⇒ Object
- #validate!(context = nil) ⇒ Object
- #validates_absence_of(*attr_names) ⇒ Object
- #validates_acceptance_of(*attr_names) ⇒ Object
- #validates_confirmation_of(*attr_names) ⇒ Object
- #validates_exclusion_of(*attr_names) ⇒ Object
- #validates_format_of(*attr_names) ⇒ Object
- #validates_inclusion_of(*attr_names) ⇒ Object
- #validates_length_of(*attr_names) ⇒ Object
- #validates_numericality_of(*attr_names) ⇒ Object
- #validates_presence_of(*attr_names) ⇒ Object
- #validates_size_of(*attr_names) ⇒ Object
- #validates_with(*args, &block) ⇒ Object
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
Class Method Details
.attribute(name, type = Type::Value.new, **options) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.attribute_method?(attribute) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.attribute_missing(match, *args, &block) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.attribute_names ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.attributes(*attributes) ⇒ Array<Symbol> Originally defined in module Attributes::ClassMethods
Get or set attributes on a context class
.clear_validators!(attribute) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.method_missing(method, *args, &block) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.respond_to?(method, include_private_methods = false) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.respond_to_without_attributes?(method, include_private_methods = false) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.validate(*args, &block) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.validates(*attributes) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.validates!(*attributes) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.validates_absence_of(*attr_names) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.validates_acceptance_of(*attr_names) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.validates_confirmation_of(*attr_names) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.validates_each(*attr_names, &block) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.validates_exclusion_of(*attr_names) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.validates_format_of(*attr_names) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.validates_inclusion_of(*attr_names) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.validates_length_of(*attr_names) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.validates_numericality_of(*attr_names) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.validates_presence_of(*attr_names) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.validates_size_of(*attr_names) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.validates_with(*args, &block) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.validators ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
.validators_on(*attributes) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
Instance Method Details
#[](name) ⇒ Object Originally defined in module Attributes
Returns the value of an attribute
#[]=(name, value) ⇒ Object Originally defined in module Attributes
Sets value of a Hash attribute in context.attributes
#attribute?(attr_name) ⇒ Boolean Also known as: has_attribute? Originally defined in module Attributes
Check if the context instance has an attribute
#attribute_missing(match, *args, &block) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
#attribute_names ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
#attributes ⇒ Hash{Symbol => *} Originally defined in module Attributes
Get values defined on the instance of context whose keys are defined on the context class' .attributes
#called!(interactor) ⇒ Array<Class> Originally defined in module Status
Add an instance of interactor to the list of interactors called on the context. This list is used when #rollback! is called on a context instance.
#errors ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
#fail!(errors = nil) ⇒ Object Originally defined in module Status
Fail the context instance. Failing an instance raises an error that may be rescued by the calling interactor. The instance is also flagged as having failed.
#failure? ⇒ Boolean Also known as: fail? Originally defined in module Status
#failure_errors ⇒ ActiveModel::Errors Originally defined in module Errors
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Generic errors generated outside of validation.
#initialize(context = {}) ⇒ Base Originally defined in module Attributes
Initialize a new instance of Base
#invalid?(context = nil) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
#merge!(context) ⇒ self Originally defined in module Attributes
#resolve ⇒ self Originally defined in module Status
Resolve an instance of context. Called when an interactor is finished with it's context.
#respond_to?(method, include_private_methods = false) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
#respond_to_without_attributes?(method, include_private_methods = false) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
#rollback! ⇒ Boolean Originally defined in module Status
Rollback an instance of context. Any interactors the instance has been passed via the #called! method are asked to roll themselves back by invoking their #rollback methods. The instance is also flagged as rolled back.
#success? ⇒ Boolean Also known as: successful? Originally defined in module Status
#valid?(context = nil) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
#validate(context = nil) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
#validate!(context = nil) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
#validates_absence_of(*attr_names) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
#validates_acceptance_of(*attr_names) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
#validates_confirmation_of(*attr_names) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
#validates_exclusion_of(*attr_names) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
#validates_format_of(*attr_names) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
#validates_inclusion_of(*attr_names) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
#validates_length_of(*attr_names) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
#validates_numericality_of(*attr_names) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
#validates_presence_of(*attr_names) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
#validates_size_of(*attr_names) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |
#validates_with(*args, &block) ⇒ Object
323 324 325 326 327 328 329 330 331 |
# File 'lib/active_interactor/context/base.rb', line 323 class Base < OpenStruct extend ActiveInteractor::Context::Attributes::ClassMethods include ActiveModel::Attributes include ActiveModel::Validations include ActiveInteractor::Context::Attributes include ActiveInteractor::Context::Errors include ActiveInteractor::Context::Status end |