Class: Rubyang::Database
- Inherits:
-
Object
show all
- Defined in:
- lib/rubyang/database.rb,
lib/rubyang/database/logger.rb,
lib/rubyang/database/data_tree.rb,
lib/rubyang/database/schema_tree.rb,
lib/rubyang/database/component_manager.rb
Defined Under Namespace
Classes: ComponentManager, DataTree, Logger, SchemaTree
Instance Method Summary
collapse
Constructor Details
Returns a new instance of Database.
Instance Method Details
#configuration ⇒ Object
38
39
40
|
# File 'lib/rubyang/database.rb', line 38
def configuration
@config_tree.root
end
|
34
35
36
|
# File 'lib/rubyang/database.rb', line 34
def configure
@config_tree.root
end
|
#load_model(model) ⇒ Object
30
31
32
|
# File 'lib/rubyang/database.rb', line 30
def load_model model
@schema_tree.load model
end
|
#oper ⇒ Object
42
43
44
|
# File 'lib/rubyang/database.rb', line 42
def oper
@oper_tree.root
end
|
#operational ⇒ Object
46
47
48
|
# File 'lib/rubyang/database.rb', line 46
def operational
@oper_tree.root
end
|
#to_s(parent = true) ⇒ Object
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/rubyang/database.rb', line 19
def to_s parent=true
head, vars, tail = "#<#{self.class.to_s}:0x#{(self.object_id << 1).to_s(16).rjust(14,'0')} ", Array.new, ">"
if parent
vars.push "@yangs=#{@yangs.to_s}"
vars.push "@schema_tree=#{@schema_tree.to_s( false )}"
vars.push "@config_tree=#{@config_tree.to_s( false )}"
vars.push "@oper_tree=#{@oper_tree.to_s( false )}"
end
head + vars.join(', ') + tail
end
|