Class: TTY::Link::ValueError
Overview
Raised when a parameter value doesn’t match the allowed values
Instance Method Summary collapse
-
#initialize(param_name, invalid_value, allowed_values) ⇒ ValueError
constructor
private
Create a ValueError instance.
Constructor Details
#initialize(param_name, invalid_value, allowed_values) ⇒ ValueError
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Create a TTY::Link::ValueError instance
67 68 69 70 71 72 73 74 |
# File 'lib/tty/link/errors.rb', line 67 def initialize(param_name, invalid_value, allowed_values) super(format( MESSAGE, param_name: param_name.inspect, invalid_value: invalid_value.inspect, allowed_values: allowed_values.map(&:inspect).join(VALUES_SEPARATOR) )) end |