Class: FluentValidation::Validators::AttributeValidatorContext
- Inherits:
-
Object
- Object
- FluentValidation::Validators::AttributeValidatorContext
- Defined in:
- lib/fluent_validation/validators/attribute_validator_context.rb
Instance Attribute Summary collapse
-
#attribute_name ⇒ Object
readonly
Returns the value of attribute attribute_name.
-
#attribute_value ⇒ Object
readonly
Returns the value of attribute attribute_value.
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
Instance Method Summary collapse
-
#initialize(attribute_name, attribute_value, error_code = nil) ⇒ AttributeValidatorContext
constructor
A new instance of AttributeValidatorContext.
Constructor Details
#initialize(attribute_name, attribute_value, error_code = nil) ⇒ AttributeValidatorContext
Returns a new instance of AttributeValidatorContext.
6 7 8 9 10 |
# File 'lib/fluent_validation/validators/attribute_validator_context.rb', line 6 def initialize(attribute_name, attribute_value, error_code = nil) @attribute_name = attribute_name @attribute_value = attribute_value @error_code = error_code end |
Instance Attribute Details
#attribute_name ⇒ Object (readonly)
Returns the value of attribute attribute_name.
4 5 6 |
# File 'lib/fluent_validation/validators/attribute_validator_context.rb', line 4 def attribute_name @attribute_name end |
#attribute_value ⇒ Object (readonly)
Returns the value of attribute attribute_value.
4 5 6 |
# File 'lib/fluent_validation/validators/attribute_validator_context.rb', line 4 def attribute_value @attribute_value end |
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
4 5 6 |
# File 'lib/fluent_validation/validators/attribute_validator_context.rb', line 4 def error_code @error_code end |