Class: JSON::Schema::Booelean

Inherits:
Leaf
  • Object
show all
Defined in:
lib/json/schema/boolean.rb

Overview

The JSON::Schema::Boolean class represents a boolean value in a JSON schema. It is a subclass of JSON::Schema::Leaf.

Instance Method Summary collapse

Methods inherited from Leaf

#const, #default, #description, #enum, #initialize, #required, #required?, #to_json

Constructor Details

This class inherits a constructor from JSON::Schema::Leaf

Instance Method Details

#to_hObject



9
10
11
# File 'lib/json/schema/boolean.rb', line 9

def to_h
  super.merge!({type: "boolean"})
end