Exception: AlphaCard::InvalidAttributeType

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

Overview

AlphaCard resource attributes value error

Instance Method Summary collapse

Constructor Details

#initialize(value, types) ⇒ InvalidAttributeType

Exception constructor. Returns an error with message about wrong attribute value type.

Parameters:

  • value (Object)

    current attribute value

  • types (Array)

    possible attribute types



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

def initialize(value, types)
  super("'#{value}' must be an instance of #{types.join(', ')}")
end