Class: Dry::Validation::Hint

Inherits:
Message
  • Object
show all
Defined in:
lib/dry/validation/message.rb

Direct Known Subclasses

Each

Defined Under Namespace

Classes: Each

Constant Summary

Constants inherited from Message

Message::Index

Instance Attribute Summary

Attributes inherited from Message

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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Message

#each?, #eql?, #initialize, #root?, #signature, #to_s

Constructor Details

This class inherits a constructor from Dry::Validation::Message

Class Method Details

.[](predicate, path, text, options) ⇒ Object



70
71
72
73
# File 'lib/dry/validation/message.rb', line 70

def self.[](predicate, path, text, options)
  klass = options[:each] ? Hint::Each : Hint
  klass.new(predicate, path, text, options)
end

Instance Method Details

#hint?Boolean

Returns:

  • (Boolean)


81
82
83
# File 'lib/dry/validation/message.rb', line 81

def hint?
  true
end