Class: VanillaValidator::Rules::BaseRule
- Inherits:
-
Object
- Object
- VanillaValidator::Rules::BaseRule
- Defined in:
- lib/vanilla_validator/rules/base_rule.rb
Direct Known Subclasses
After, AfterOrEqual, Alpha, Before, BeforeOrEqual, BlockRule, Boolean, Date, Email, Eq, Falsy, Gte, In, Like, Max, Min, Numeric, Required, RequiredIf, Url
Instance Attribute Summary collapse
-
#attribute ⇒ Object
Returns the value of attribute attribute.
-
#parameters ⇒ Object
Returns the value of attribute parameters.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(attribute, value, parameters) ⇒ BaseRule
constructor
A new instance of BaseRule.
Constructor Details
#initialize(attribute, value, parameters) ⇒ BaseRule
Returns a new instance of BaseRule.
6 7 8 |
# File 'lib/vanilla_validator/rules/base_rule.rb', line 6 def initialize(attribute, value, parameters) @attribute, @value, @parameters = attribute, value, parameters end |
Instance Attribute Details
#attribute ⇒ Object
Returns the value of attribute attribute.
4 5 6 |
# File 'lib/vanilla_validator/rules/base_rule.rb', line 4 def attribute @attribute end |
#parameters ⇒ Object
Returns the value of attribute parameters.
4 5 6 |
# File 'lib/vanilla_validator/rules/base_rule.rb', line 4 def parameters @parameters end |
#value ⇒ Object
Returns the value of attribute value.
4 5 6 |
# File 'lib/vanilla_validator/rules/base_rule.rb', line 4 def value @value end |