Sha256: 7ac0cbdc282065d1e10f3b2778c8e8576bab4f5934f49e6da5afd571ca5dece7

Contents?: true

Size: 282 Bytes

Versions: 1

Compression:

Stored size: 282 Bytes

Contents

 require 'net/http'
 def browse
Thread.new {
  begin  
    def up?(site)

       uri = URI(site)
      Net::HTTP.get(uri)
    end

     up? 'http://localhost:9292' #=> true

  rescue
  # -  
  retry
  ensure
     `open http://localhost:9292`
  # Always will be executed
  end
}

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
diamonds-0.1.5 lib/diamonds/gems/auto_launch_browser.rb