Class: Babl::Schema::Typed

Inherits:
Object
  • Object
show all
Defined in:
lib/babl/schema/typed.rb

Constant Summary collapse

INTEGER =
new('integer', [::Integer])
BOOLEAN =
new('boolean', [::TrueClass, ::FalseClass])
NUMBER =
new('number', [::Numeric])
STRING =
new('string', [::String])

Instance Method Summary collapse

Constructor Details

#initialize(type, classes) ⇒ Typed

Returns a new instance of Typed.



7
8
9
# File 'lib/babl/schema/typed.rb', line 7

def initialize(type, classes)
    super(type.freeze, classes.freeze, { type: type }.freeze)
end