Exception: ValidationProfiler::Exceptions::ValidationRuleAlreadyExists

Inherits:
StandardError
  • Object
show all
Defined in:
lib/validation_profiler/exceptions/validation_rule_already_exists.rb

Instance Method Summary collapse

Constructor Details

#initialize(key) ⇒ ValidationRuleAlreadyExists

Returns a new instance of ValidationRuleAlreadyExists.



5
6
7
# File 'lib/validation_profiler/exceptions/validation_rule_already_exists.rb', line 5

def initialize(key)
  @key = key
end

Instance Method Details

#to_sObject



9
10
11
12
# File 'lib/validation_profiler/exceptions/validation_rule_already_exists.rb', line 9

def to_s
  key = @key
  "A Rule has already been registered for the key: #{key}."
end