Sha256: 11791249f367c0ff8458a84551cf1e63b7675685cf5575fc5af444b119af0b13

Contents?: true

Size: 612 Bytes

Versions: 7

Compression:

Stored size: 612 Bytes

Contents

module PoolParty
    
  class Pool < Base
    attr_accessor :verbose, :very_verbose, :debugging, :very_debugging, :auto_execute
    
    def cloud(name, &block)
      clouds[name.to_s] = Cloud.new(name.to_s, {:parent => self}, &block)
    end
    def clouds
      @clouds ||= {}
    end
        
    at_exit do
      if pool.auto_execute
        puts <<-EOE
----> Running #{pool.name} #{pool.auto_execute}
        EOE
        pool.run
      end
    end
    
    def run
      clouds.each do |cloud_name, cld|
        puts "----> Starting to build cloud #{cloud_name}"
        cld.run
      end
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
poolparty-1.4.6 lib/poolparty/pool.rb
poolparty-1.4.5 lib/poolparty/pool.rb
poolparty-1.4.4 lib/poolparty/pool.rb
poolparty-1.4.3 lib/poolparty/pool.rb
poolparty-1.4.2 lib/poolparty/pool.rb
poolparty-1.4.1 lib/poolparty/pool.rb
poolparty-1.4.0 lib/poolparty/pool.rb