Class: NxtSchema::Template::Collection
- Includes:
- HasSubNodes
- Defined in:
- lib/nxt_schema/template/collection.rb
Constant Summary collapse
Instance Attribute Summary
Attributes inherited from Base
#additional_keys_strategy, #configuration, #context, #key_transformer, #maybe_evaluators, #meta, #name, #on_evaluators, #options, #parent_node, #path, #root_node, #type, #type_system, #validations
Instance Method Summary collapse
-
#initialize(name:, type: DEFAULT_TYPE, parent_node:, **options, &block) ⇒ Collection
constructor
A new instance of Collection.
Methods included from HasSubNodes
#[], #any_of, #collection, #ensure_sub_nodes_present, #node, #schema, #sub_nodes
Methods inherited from Base
#apply, #apply!, #build_node, #default, #maybe, #omnipresent?, #on, #optional?, #root_node?, #validate, #validate_with
Constructor Details
#initialize(name:, type: DEFAULT_TYPE, parent_node:, **options, &block) ⇒ Collection
Returns a new instance of Collection.
8 9 10 11 |
# File 'lib/nxt_schema/template/collection.rb', line 8 def initialize(name:, type: DEFAULT_TYPE, parent_node:, **, &block) super ensure_sub_nodes_present end |