Sha256: 7f0fd5f34fb5859175f892a6d4d190cce4505515688624326d44624d9bb0fb9b

Contents?: true

Size: 485 Bytes

Versions: 2

Compression:

Stored size: 485 Bytes

Contents

require 'pp'
module Mccloud
  module Util
    def on_selected_machines(selection=nil)
      if selection.nil? || selection == "all"
        puts "no selection - all machines"
        @session.config.vms.each do |name,vm|
          id=@all_servers["#{name}"]
          vm=@session.config.vms[name]
          yield id,vm

        end
      else
        name=selection
        id=@all_servers["#{name}"]
        vm=@session.config.vms[name]
        yield id,vm
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mccloud-0.0.2 lib/mccloud/util/iterator.rb
mccloud-0.0.1 lib/mccloud/util/iterator.rb