Class: Rubyang::Database::SchemaTree::Container
- Inherits:
-
InteriorSchemaNode
- Object
- SchemaNode
- InteriorSchemaNode
- Rubyang::Database::SchemaTree::Container
- Defined in:
- lib/rubyang/database/schema_tree.rb
Instance Attribute Summary collapse
-
#musts ⇒ Object
Returns the value of attribute musts.
-
#whens ⇒ Object
Returns the value of attribute whens.
Attributes inherited from InteriorSchemaNode
#arg, #children, #parent, #yang, #yangs
Attributes inherited from SchemaNode
#arg, #module, #parent, #yang, #yangs
Instance Method Summary collapse
-
#initialize(*args) ⇒ Container
constructor
A new instance of Container.
- #to_json_recursive(h) ⇒ Object
Methods inherited from InteriorSchemaNode
Methods inherited from SchemaNode
#evaluate_xpath, #evaluate_xpath_axis, #evaluate_xpath_expr, #evaluate_xpath_node_test, #evaluate_xpath_path, #evaluate_xpath_predicates, #load_yang, #model, #namespace, #prefix, #root, #to_json, #to_s
Constructor Details
#initialize(*args) ⇒ Container
Returns a new instance of Container.
1120 1121 1122 1123 1124 |
# File 'lib/rubyang/database/schema_tree.rb', line 1120 def initialize *args super @whens = [] @musts = [] end |
Instance Attribute Details
#musts ⇒ Object
Returns the value of attribute musts.
1119 1120 1121 |
# File 'lib/rubyang/database/schema_tree.rb', line 1119 def musts @musts end |
#whens ⇒ Object
Returns the value of attribute whens.
1119 1120 1121 |
# File 'lib/rubyang/database/schema_tree.rb', line 1119 def whens @whens end |
Instance Method Details
#to_json_recursive(h) ⇒ Object
1125 1126 1127 1128 1129 1130 1131 1132 1133 |
# File 'lib/rubyang/database/schema_tree.rb', line 1125 def to_json_recursive h h['type'] = 'container' h['arg'] = @arg h['children'] = Hash.new @children.each{ |c| c.to_json_recursive h['children'] } h end |