Sha256: f27621c153992bc9c79b09a5f09924daef85e1fb604434c17019d125c860d9d9

Contents?: true

Size: 493 Bytes

Versions: 18

Compression:

Stored size: 493 Bytes

Contents

class Object
    
  def pool(name=nil, &block)
    @@pool ||= PoolParty::Pool.new(name, &block)
  end
  
  def reset!
    @@pool = nil
  end
  
  def print_msg(msg_arr)
    msg_arr.each do |line|
      puts line
    end
  end
  
  def progress_bar_until(msg=nil, &block)
    print "#{msg}" if msg
    loop do
      if block.call
        break
      else
        $stdout.print "."
        $stdout.flush
        sleep 1
      end
    end
    print " OK" if msg
    puts "" if msg
  end
  
  
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
poolparty-1.6.8 lib/core/object.rb
poolparty-1.6.7 lib/core/object.rb
poolparty-1.6.6 lib/core/object.rb
poolparty-1.6.5 lib/core/object.rb
poolparty-1.6.4 lib/core/object.rb
poolparty-1.6.3 lib/core/object.rb
poolparty-1.6.2 lib/core/object.rb
poolparty-1.6.1 lib/core/object.rb
poolparty-1.6.0 lib/core/object.rb
poolparty-1.5.0 lib/core/object.rb
poolparty-1.4.8 lib/core/object.rb
poolparty-1.4.7 lib/core/object.rb
poolparty-1.4.6 lib/core/object.rb
poolparty-1.4.5 lib/core/object.rb
poolparty-1.4.4 lib/core/object.rb
poolparty-1.4.3 lib/core/object.rb
poolparty-1.4.2 lib/core/object.rb
poolparty-1.4.1 lib/core/object.rb