Exception: SimpleSchema::InvalidSchemaType

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ InvalidSchemaType

Returns a new instance of InvalidSchemaType.



8
9
10
11
# File 'lib/simple_schema/errors.rb', line 8

def initialize(type)
  @type = type
  super "Schema must be either an Array or a Hash, got #{type}"
end

Instance Attribute Details

#typeObject (readonly)

Returns the value of attribute type.



7
8
9
# File 'lib/simple_schema/errors.rb', line 7

def type
  @type
end