Module: Familia::Validation::Config
- Defined in:
- lib/familia/validation.rb
Overview
Configuration for validation framework
Constant Summary collapse
- DEFAULT_OPTIONS =
Default options for validators
{ auto_register_middleware: true, strict_atomicity: true, performance_tracking: true, command_filtering: :all }.freeze
Class Attribute Summary collapse
-
.options ⇒ Object
Returns the value of attribute options.
Class Method Summary collapse
-
.auto_register_middleware? ⇒ Boolean
Option accessors.
-
.command_filtering ⇒ Object
-
.configure {|_self| ... } ⇒ Object
-
.performance_tracking? ⇒ Boolean
-
.reset! ⇒ Object
-
.strict_atomicity? ⇒ Boolean
Class Attribute Details
.options ⇒ Object
Returns the value of attribute options.
108 109 110 |
# File 'lib/familia/validation.rb', line 108 def @options end |
Class Method Details
.auto_register_middleware? ⇒ Boolean
Option accessors
119 120 121 |
# File 'lib/familia/validation.rb', line 119 def auto_register_middleware? @options[:auto_register_middleware] end |
.command_filtering ⇒ Object
131 132 133 |
# File 'lib/familia/validation.rb', line 131 def command_filtering @options[:command_filtering] end |
.configure {|_self| ... } ⇒ Object
110 111 112 |
# File 'lib/familia/validation.rb', line 110 def configure yield self if block_given? end |
.performance_tracking? ⇒ Boolean
127 128 129 |
# File 'lib/familia/validation.rb', line 127 def performance_tracking? @options[:performance_tracking] end |
.reset! ⇒ Object
114 115 116 |
# File 'lib/familia/validation.rb', line 114 def reset! @options = DEFAULT_OPTIONS.dup end |
.strict_atomicity? ⇒ Boolean
123 124 125 |
# File 'lib/familia/validation.rb', line 123 def strict_atomicity? @options[:strict_atomicity] end |