Class: Babl::Schema::Primitive
- Inherits:
-
Object
- Object
- Babl::Schema::Primitive
- Defined in:
- lib/babl/schema/primitive.rb
Constant Summary collapse
- NULL =
new(nil)
- TRUE =
new(true)
- FALSE =
new(false)
Instance Method Summary collapse
-
#initialize(value) ⇒ Primitive
constructor
A new instance of Primitive.
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 |