Class: Varify::Rules::IsARule
Instance Method Summary collapse
Methods inherited from Rule
Constructor Details
This class inherits a constructor from Varify::Rules::Rule
Instance Method Details
#error_message ⇒ Object
10 11 12 |
# File 'lib/varify/rules/is_a.rb', line 10 def "#{@name} (:#{@key}) must be a #{@options.name}" end |
#valid? ⇒ Boolean
6 7 8 |
# File 'lib/varify/rules/is_a.rb', line 6 def valid? @value.is_a?() end |