Class: Dry::Validation::Message::Check

Inherits:
Dry::Validation::Message show all
Defined in:
lib/dry/validation/message.rb

Instance Attribute Summary

Attributes inherited from Dry::Validation::Message

#args, #options, #path, #predicate, #rule, #text

Instance Method Summary collapse

Methods inherited from Dry::Validation::Message

[], #eql?, #hint?, #root?, #signature, #to_s

Constructor Details

#initialize(*args) ⇒ Check

Returns a new instance of Check.



40
41
42
43
# File 'lib/dry/validation/message.rb', line 40

def initialize(*args)
  super
  @path = [rule] unless rule.to_s.end_with?('?') || path.include?(rule)
end