class NxtSchema::Template::Schema
Constants
- DEFAULT_TYPE
Public Class Methods
new(name:, type: DEFAULT_TYPE, parent_node:, **options, &block)
click to toggle source
Calls superclass method
NxtSchema::Template::Base::new
# File lib/nxt_schema/template/schema.rb, line 8 def initialize(name:, type: DEFAULT_TYPE, parent_node:, **options, &block) super ensure_sub_nodes_present end
Public Instance Methods
omnipresent(name, node_or_type_of_node, **options, &block)
click to toggle source
# File lib/nxt_schema/template/schema.rb, line 17 def omnipresent(name, node_or_type_of_node, **options, &block) node(name, node_or_type_of_node, **options.merge(omnipresent: true), &block) end
optional(name, node_or_type_of_node, **options, &block)
click to toggle source
# File lib/nxt_schema/template/schema.rb, line 13 def optional(name, node_or_type_of_node, **options, &block) node(name, node_or_type_of_node, **options.merge(optional: true), &block) end