Exception: AlphaCard::InvalidAttributeValue

Inherits:
StandardError
  • Object
show all
Defined in:
lib/alpha_card/errors/invalid_attribute_value.rb

Overview

AlphaCard resource attributes value error

Instance Method Summary collapse

Constructor Details

#initialize(value, values) ⇒ InvalidAttributeValue

Exception constructor. Returns an error with message about wrong value and possible values.

Parameters:

  • value (Object)

    current attribute value

  • values (Array)

    possible attribute values



10
11
12
# File 'lib/alpha_card/errors/invalid_attribute_value.rb', line 10

def initialize(value, values)
  super("'#{value}' is invalid attribute value. Use one from the following: #{values.join(', ')}")
end