Class: VanillaValidator::Rules::BaseRule

Inherits:
Object
  • Object
show all
Defined in:
lib/vanilla_validator/rules/base_rule.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#attributeObject

Returns the value of attribute attribute.



4
5
6
# File 'lib/vanilla_validator/rules/base_rule.rb', line 4

def attribute
  @attribute
end

#parametersObject

Returns the value of attribute parameters.



4
5
6
# File 'lib/vanilla_validator/rules/base_rule.rb', line 4

def parameters
  @parameters
end

#valueObject

Returns the value of attribute value.



4
5
6
# File 'lib/vanilla_validator/rules/base_rule.rb', line 4

def value
  @value
end