Exception: ModelAttribute::UnsupportedTypeError

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

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ UnsupportedTypeError

Returns a new instance of UnsupportedTypeError.



9
10
11
12
# File 'lib/model_attribute/errors.rb', line 9

def initialize(type)
  types_list = ModelAttribute::SUPPORTED_TYPES.map(&:inspect).join(', ')
  super "Unsupported type #{type.inspect}. Must be one of #{types_list}."
end