Class: VanillaValidator::Rule
- Inherits:
-
Object
- Object
- VanillaValidator::Rule
- Defined in:
- lib/vanilla_validator/rule.rb
Overview
Rule represents a validation rule with a name and optional parameters.
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#parameters ⇒ Object
Returns the value of attribute parameters.
Instance Method Summary collapse
-
#initialize(name, parameters) ⇒ Rule
constructor
A new instance of Rule.
Constructor Details
#initialize(name, parameters) ⇒ Rule
Returns a new instance of Rule.
6 7 8 |
# File 'lib/vanilla_validator/rule.rb', line 6 def initialize(name, parameters) @name, @parameters = name, parameters end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/vanilla_validator/rule.rb', line 4 def name @name end |
#parameters ⇒ Object
Returns the value of attribute parameters.
4 5 6 |
# File 'lib/vanilla_validator/rule.rb', line 4 def parameters @parameters end |