Exception: AlphaCard::InvalidAttributeFormat

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

Overview

AlphaCard resource attributes format error

Instance Method Summary collapse

Constructor Details

#initialize(value, format) ⇒ InvalidAttributeFormat

Exception constructor. Returns an error with message about wrong attribute format.

Parameters:

  • value (Object)

    current attribute value

  • format (Regexp)

    required format



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

def initialize(value, format)
  super("'#{value}' does not match the '#{format.inspect}' format")
end