class Leibniz::Infrastructure

Public Class Methods

new(instances) click to toggle source
# File lib/leibniz.rb, line 31
def initialize(instances)
  @nodes = Hash.new
  instances.each do |instance|
    @nodes[instance.name.sub(/^leibniz-/, '')] = Node.new(instance)
  end
end

Public Instance Methods

[](name) click to toggle source
# File lib/leibniz.rb, line 38
def [](name)
  @nodes[name]
end
converge() click to toggle source
# File lib/leibniz.rb, line 42
def converge
  @nodes.each_pair { |name, node| node.converge }
end
destroy() click to toggle source
# File lib/leibniz.rb, line 46
def destroy
  @nodes.each_pair { |name, node| node.destroy }
end