class Rubble::Environment

Attributes

name[R]
plans[R]
tool[R]

Public Class Methods

new(tool, name) click to toggle source

Action statt plan

# File lib/rubble/environment.rb, line 12
def initialize(tool, name)
    @tool = tool
    @name = name
    @plans = []
end

Public Instance Methods

add_plan(plan) click to toggle source
# File lib/rubble/environment.rb, line 28
def add_plan(plan)
    @plans << plan
end
execute(context) { |plan, context| ... } click to toggle source
# File lib/rubble/environment.rb, line 32
def execute(context)
    @plans.each do |plan|
        yield(plan, context)
    end
end
server(*names, &block) click to toggle source
# File lib/rubble/environment.rb, line 18
def server(*names, &block)
    names.each do |name|
        server = @tool.provide_server(name)
        scope = Scope.new(self, server)
        if not block.nil? then
            Docile.dsl_eval(scope, &block)
        end
    end
end