Sha256: e25ad4b00bfd7e6413c2895a0ea5d6845267681320d3d232ddd364627338075d
Contents?: true
Size: 866 Bytes
Versions: 9
Compression:
Stored size: 866 Bytes
Contents
module Foobara module BuiltinTypes module Model module Validators class AttributesDeclaration < TypeDeclarations::Processor class << self def requires_parent_declaration_data? true end def requires_declaration_data? false end end def always_applicable? true end def process_value(model_instance) Outcome.new(result: model_instance, errors: model_instance.validation_errors) end def possible_errors model_class_name = parent_declaration_data[:model_class] if model_class_name Object.const_get(model_class_name).possible_errors else super end end end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems