class StValidation::ValidatorFactory::ProcValidatorWrapper
Public Class Methods
new(proc_object)
click to toggle source
# File lib/st_validation/validator_factory.rb, line 6 def initialize(proc_object) @proc_object = proc_object end
Public Instance Methods
call(value)
click to toggle source
# File lib/st_validation/validator_factory.rb, line 10 def call(value) @proc_object.call(value) end
Private Instance Methods
generate_explanation(value)
click to toggle source
# File lib/st_validation/validator_factory.rb, line 16 def generate_explanation(value) return nil if call(value) @proc_object.source_location end