Exception: SimpleSchema::InvalidDataType

Inherits:
Exception
  • Object
show all
Defined in:
lib/simple_schema/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ InvalidDataType

Returns a new instance of InvalidDataType.



16
17
18
19
# File 'lib/simple_schema/errors.rb', line 16

def initialize(type)
  @type = type
  super "Data must be a Hash, got #{type}"
end

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



15
16
17
# File 'lib/simple_schema/errors.rb', line 15

def type
  @type
end