Class: Rubyang::Database::DataTree::LeafList
- Inherits:
-
InteriorNode
- Object
- Node
- InteriorNode
- Rubyang::Database::DataTree::LeafList
- Defined in:
- lib/rubyang/database/data_tree.rb
Instance Attribute Summary
Attributes inherited from Node
#children, #parent, #schema, #schema_tree
Instance Method Summary collapse
Methods inherited from InteriorNode
#delete, #delete_same_choice_other_case, #edit, #edit_xpath, #find_child_schema, #to_json_recursive
Methods inherited from Node
#evaluate_max_elements, #evaluate_min_elements, #evaluate_musts, #evaluate_whens, #evaluate_xpath, #evaluate_xpath_axis, #evaluate_xpath_expr, #evaluate_xpath_node_test, #evaluate_xpath_path, #evaluate_xpath_predicates, #initialize, #load_merge_xml_recursive, #root, #to_json, #to_s, #to_xml, #valid?
Constructor Details
This class inherits a constructor from Rubyang::Database::DataTree::Node
Instance Method Details
#set(arg) ⇒ Object
1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 |
# File 'lib/rubyang/database/data_tree.rb', line 1075 def set arg child_node = @children.find{ |c| c.value == arg } unless child_node begin child_node = LeafListElement.new( self, @schema_tree, @schema, @db_mode, @ctx_mode, arg ) rescue raise ArgumentError end @children.push child_node end child_node end |
#to_xml_recursive(_doc, current_namespace) ⇒ Object
1087 1088 1089 1090 1091 1092 |
# File 'lib/rubyang/database/data_tree.rb', line 1087 def to_xml_recursive _doc, current_namespace doc = _doc @children.each{ |c| c.to_xml_recursive doc, current_namespace } end |