Class: Rubyang::Database::SchemaTree::Root

Inherits:
InteriorSchemaNode show all
Defined in:
lib/rubyang/database/schema_tree.rb

Instance Attribute Summary

Attributes inherited from InteriorSchemaNode

#arg, #children, #parent, #yang, #yangs

Attributes inherited from SchemaNode

#arg, #module, #parent, #yang, #yangs

Instance Method Summary collapse

Methods inherited from InteriorSchemaNode

#resolve_node, #resolve_uses

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, #root, #to_json, #to_s

Constructor Details

#initialize(yangs, arg = nil, yang = nil, parent = nil, _module = nil) ⇒ Root

Returns a new instance of Root.



1094
1095
1096
# File 'lib/rubyang/database/schema_tree.rb', line 1094

def initialize yangs, arg=nil, yang=nil, parent=nil, _module=nil
  super
end

Instance Method Details

#namespaceObject



1097
1098
1099
# File 'lib/rubyang/database/schema_tree.rb', line 1097

def namespace
  'http://rubyang/0.1'
end

#prefixObject



1100
1101
1102
# File 'lib/rubyang/database/schema_tree.rb', line 1100

def prefix
  ''
end

#to_json_recursive(h) ⇒ Object



1103
1104
1105
1106
1107
1108
# File 'lib/rubyang/database/schema_tree.rb', line 1103

def to_json_recursive h
  @children.each{ |c|
    c.to_json_recursive h
  }
  h
end