Class: JSON::Schema::Array
Overview
The JSON::Schema::Array class represents an array value in a JSON schema. It is a subclass of JSON::Schema::Leaf and provides methods that can act as constraints.
Instance Method Summary collapse
-
#initialize(*items) ⇒ Array
constructor
A new instance of Array.
-
#to_h ⇒ Object
-
#to_json(options = {}) ⇒ Object
Methods inherited from Leaf
#const, #default, #description, #enum, #required, #required?
Constructor Details
#initialize(*items) ⇒ Array
Returns a new instance of Array.
10 11 12 |
# File 'lib/json/schema/array.rb', line 10 def initialize(*items) @items = items end |