Module: JSI::Schema::Application::InplaceApplication
- Defined in:
- lib/jsi/schema/application/inplace_application.rb
Defined Under Namespace
Modules: Dependencies, Draft04, Draft06, Draft07, IfThenElse, Ref, SomeOf
Instance Method Summary collapse
-
#each_inplace_applicator_schema(instance, visited_refs: []) {|JSI::Schema| ... } ⇒ nil, Enumerator
yields each inplace applicator schema which applies to the given instance.
-
#inplace_applicator_schemas(instance) ⇒ JSI::SchemaSet
a set of inplace applicator schemas of this schema (from $ref, allOf, etc.) which apply to the given instance.
Instance Method Details
#each_inplace_applicator_schema(instance, visited_refs: []) {|JSI::Schema| ... } ⇒ nil, Enumerator
yields each inplace applicator schema which applies to the given instance.
31 32 33 34 35 36 37 38 39 |
# File 'lib/jsi/schema/application/inplace_application.rb', line 31 def each_inplace_applicator_schema(instance, visited_refs: [], &block) return to_enum(__method__, instance, visited_refs: visited_refs) unless block catch(:jsi_application_done) do internal_inplace_applicate_keywords(instance, visited_refs, &block) end nil end |
#inplace_applicator_schemas(instance) ⇒ JSI::SchemaSet
a set of inplace applicator schemas of this schema (from $ref, allOf, etc.) which apply to the given instance.
the returned set will contain this schema itself, unless this schema contains a $ref keyword.
21 22 23 |
# File 'lib/jsi/schema/application/inplace_application.rb', line 21 def inplace_applicator_schemas(instance) SchemaSet.new(each_inplace_applicator_schema(instance)) end |