Class: Babl::Schema::Primitive

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

Constant Summary collapse

NULL =
new(nil)
TRUE =
new(true)
FALSE =
new(false)

Instance Method Summary collapse

Constructor Details

#initialize(value) ⇒ Primitive

Returns a new instance of Primitive.



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

def initialize(value)
    super(value, ::NilClass === value ? { type: 'null' } : { enum: [value] })
end