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.
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.
30 31 32 33 |
# File 'lib/smart_core/validator/invoker.rb', line 30 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.
23 24 25 |
# File 'lib/smart_core/validator/invoker.rb', line 23 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.
14 15 16 |
# File 'lib/smart_core/validator/invoker.rb', line 14 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.
40 41 42 43 44 45 46 |
# File 'lib/smart_core/validator/invoker.rb', line 40 def call(validating_method) thread_safe do ErrorSet.new.tap do |outer_errors| extended_validator(outer_errors).send(validating_method) end end end |