Class: Dry::Validation::Schema::Rule::Result

Inherits:
Dry::Validation::Schema::Rule show all
Defined in:
lib/dry/validation/schema/rule.rb

Instance Attribute Summary

Attributes inherited from Dry::Validation::Schema::Rule

#name, #node

Instance Method Summary collapse

Methods inherited from Dry::Validation::Schema::Rule

#and, #initialize, #is_a?, #not, #or, #then, #to_ary, #to_check, #xor

Constructor Details

This class inherits a constructor from Dry::Validation::Schema::Rule

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args) ⇒ Object



22
23
24
# File 'lib/dry/validation/schema/rule.rb', line 22

def method_missing(meth, *args)
  self.class.new(name, [:res, [name, [:predicate, [meth, args]]]])
end

Instance Method Details

#classObject



18
19
20
# File 'lib/dry/validation/schema/rule.rb', line 18

def class
  Schema::Rule::Result
end