Sha256: dae5d72d157f5880514f780227da68d8a6d060fc148915a000d651080fc3c1c6

Contents?: true

Size: 410 Bytes

Versions: 1

Compression:

Stored size: 410 Bytes

Contents

require 'curb'

module Isitfree
  class Miner
    class << self
      def find name
        status = Curl.get("https://rubygems.org/gems/#{name}").status
        if status == '200 OK'
          puts "The gem \"#{name}\" exists. Sorry :("
          return true
        else
          puts "Yay! The gem \"#{name}\" does not exist! It's all yours!"
          return false
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
isitfree-0.0.1 lib/isitfree/miner.rb