Class: SmartCore::Validator::Invoker Private
- Inherits:
-
Object
- Object
- SmartCore::Validator::Invoker
- Defined in:
- lib/smart_core/validator/invoker.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- Error =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Class.new(StandardError)
- StopValidationError =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Class.new(Error)
Instance Attribute Summary collapse
- #validator ⇒ SmartCore::Validator readonly private
Class Method Summary collapse
Instance Method Summary collapse
- #call(validating_method) ⇒ SmartCore::Validator::ErrorSet private
- #initialize(validator) ⇒ void constructor private
Constructor Details
#initialize(validator) ⇒ void
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.
42 43 44 45 |
# File 'lib/smart_core/validator/invoker.rb', line 42 def initialize(validator) @validator = validator @access_lock = Mutex.new end |
Instance Attribute Details
#validator ⇒ SmartCore::Validator (readonly)
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.
35 36 37 |
# File 'lib/smart_core/validator/invoker.rb', line 35 def validator @validator end |
Class Method Details
.call(validator, validating_method) ⇒ SmartCore::Validator::ErrorSet
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.
26 27 28 |
# File 'lib/smart_core/validator/invoker.rb', line 26 def call(validator, validating_method) new(validator).call(validating_method) end |
Instance Method Details
#call(validating_method) ⇒ SmartCore::Validator::ErrorSet
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.
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/smart_core/validator/invoker.rb', line 53 def call(validating_method) thread_safe do ErrorSet.new.tap do |outer_errors| begin extended_validator(outer_errors).send(validating_method) rescue StopValidationError end end end end |