Class: JsonSchema::Schema
- Inherits:
-
Object
- Object
- JsonSchema::Schema
- Defined in:
- lib/json_schema-cromulent_links.rb,
lib/json_schema-example_parsing.rb
Defined Under Namespace
Classes: Link
Instance Method Summary collapse
Instance Method Details
#cromulent_links ⇒ Object
6 7 8 |
# File 'lib/json_schema-cromulent_links.rb', line 6 def cromulent_links links.select(&:cromulent?) end |
#make_example ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/json_schema-example_parsing.rb', line 21 def make_example if example return example end if items ex = items.make_example and return Array(ex) end unless any_of.empty? any_of.each {|s| ex = s.make_example and return ex } end unless all_of.empty? any_of.each {|s| ex = s.make_example and return ex } end nil end |