Class: Babl::Schema::Static

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

Constant Summary collapse

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

Instance Method Summary collapse

Instance Method Details

#jsonObject



10
11
12
13
# File 'lib/babl/schema/static.rb', line 10

def json
    return { type: 'null' } if value.nil?
    { enum: [value] }
end