Class: Vanguard::Rule::Nullary::Attribute::Length::Evaluator
Overview
Evaluator for length rules
Instance Attribute Summary
Attributes inherited from Evaluator
Instance Method Summary collapse
-
#length ⇒ Fixnum
private
Return length.
-
#valid? ⇒ true, false
private
Test if value is valid.
Methods inherited from Evaluator
Methods inherited from Evaluator
#initialize, #value, #violation, #violations
Constructor Details
This class inherits a constructor from Vanguard::Evaluator
Instance Method Details
#length ⇒ Fixnum
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return length
174 175 176 |
# File 'lib/vanguard/rule/nullary/attribute/length.rb', line 174 def length value.length end |
#valid? ⇒ true, false
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Test if value is valid
163 164 165 |
# File 'lib/vanguard/rule/nullary/attribute/length.rb', line 163 def valid? matcher.matches?(length) end |