Class: Arver::Tree

Inherits:
Object
  • Object
show all
Includes:
PartitionHierarchyNode
Defined in:
lib/arver/tree.rb

Instance Attribute Summary

Attributes included from PartitionHierarchyNode

#parent

Instance Method Summary collapse

Methods included from PartitionHierarchyNode

#==, #add_child, #child, #children, #each_node, #each_partition, #find, #has_child?, #has_parent?, #run_action, #target?, #to_ascii, #to_yaml

Constructor Details

#initializeTree

Returns a new instance of Tree.



6
7
# File 'lib/arver/tree.rb', line 6

def initialize
end

Instance Method Details

#add_host_group(host_group) ⇒ Object



17
18
19
# File 'lib/arver/tree.rb', line 17

def add_host_group(host_group)
  add_child(host_group)
end

#clearObject



28
29
30
# File 'lib/arver/tree.rb', line 28

def clear
  @children = {}
end

#from_hash(hash) ⇒ Object



21
22
23
24
25
26
# File 'lib/arver/tree.rb', line 21

def from_hash hash
  hash.each do | name, data |
    hg = Arver::Hostgroup.new( name )
    hg.from_hash( data )
  end
end

#nameObject



9
10
11
# File 'lib/arver/tree.rb', line 9

def name
  ""
end

#pathObject



13
14
15
# File 'lib/arver/tree.rb', line 13

def path
  ""
end