Exception: Qywx::Client::ConfigurationError
- Defined in:
- lib/qywx/client/errors.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#valid_values ⇒ Object
readonly
Returns the value of attribute valid_values.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(key, value, valid_values) ⇒ ConfigurationError
constructor
A new instance of ConfigurationError.
Constructor Details
#initialize(key, value, valid_values) ⇒ ConfigurationError
Returns a new instance of ConfigurationError.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/qywx/client/errors.rb', line 12 def initialize(key, value, valid_values) @key = key @valud = value @valid_values = valid_values valid_values_str = Array(valid_values).join(', ') = if value.blank? "#{key} not configured or configured with blank value, valid_values: #{valid_values_str}" else "Configure #{key} with value #{value} failed, valid_values: #{valid_values_str}" end super() end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
10 11 12 |
# File 'lib/qywx/client/errors.rb', line 10 def key @key end |
#valid_values ⇒ Object (readonly)
Returns the value of attribute valid_values.
10 11 12 |
# File 'lib/qywx/client/errors.rb', line 10 def valid_values @valid_values end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
10 11 12 |
# File 'lib/qywx/client/errors.rb', line 10 def value @value end |