Class: JSON::SchemaDsl::Renderers::Multiplexer
- Defined in:
- lib/json/schema_dsl/renderers/multiplexer.rb
Overview
Renderer that translates multiplexer properties (any_of, one_of or all_of) so that a new wrapping structure is returned that holds the original in one of these properties.
Constant Summary collapse
- KEYS =
%i[any_of one_of all_of].freeze
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#visit(entity) ⇒ Object
Boxes the entity into a new one with the multiplexer attribute set to the entity, if required.
Methods inherited from Base
Constructor Details
This class inherits a constructor from JSON::SchemaDsl::Renderers::Base
Instance Method Details
#visit(entity) ⇒ Object
Boxes the entity into a new one with the multiplexer attribute set to the entity, if required.
20 21 22 |
# File 'lib/json/schema_dsl/renderers/multiplexer.rb', line 20 def visit(entity) traverse(box(entity)) end |