Class: Interactor::Validation::Configuration
- Defined in:
- lib/interactor/validation/configuration.rb
Overview
Configuration class for interactor validation behavior
Instance Attribute Summary collapse
-
#halt ⇒ Object
Returns the value of attribute halt.
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#skip_validate ⇒ Object
Returns the value of attribute skip_validate.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
9 10 11 12 13 |
# File 'lib/interactor/validation/configuration.rb', line 9 def initialize @skip_validate = true # Skip validate! hook if validate_params! has errors @mode = :default # Error message format mode (:default or :code) @halt = false # Stop validation on first error end |
Instance Attribute Details
#halt ⇒ Object
Returns the value of attribute halt.
7 8 9 |
# File 'lib/interactor/validation/configuration.rb', line 7 def halt @halt end |
#mode ⇒ Object
Returns the value of attribute mode.
7 8 9 |
# File 'lib/interactor/validation/configuration.rb', line 7 def mode @mode end |
#skip_validate ⇒ Object
Returns the value of attribute skip_validate.
7 8 9 |
# File 'lib/interactor/validation/configuration.rb', line 7 def skip_validate @skip_validate end |