Class: FluentValidation::Validators::AttributeValidatorContext

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent_validation/validators/attribute_validator_context.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject (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_valueObject (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_codeObject (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