Exception: EnvValidator::ValidationError

Inherits:
Error
  • Object
show all
Defined in:
lib/env_validator/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(variable_name, rule, message) ⇒ ValidationError

Returns a new instance of ValidationError.



9
10
11
12
13
# File 'lib/env_validator/error.rb', line 9

def initialize(variable_name, rule, message)
  @variable_name = variable_name
  @rule = rule
  super(message)
end

Instance Attribute Details

#ruleObject (readonly)

Returns the value of attribute rule.



7
8
9
# File 'lib/env_validator/error.rb', line 7

def rule
  @rule
end

#variable_nameObject (readonly)

Returns the value of attribute variable_name.



7
8
9
# File 'lib/env_validator/error.rb', line 7

def variable_name
  @variable_name
end