Class: Jets::Gems::Exist

Inherits:
Object
  • Object
show all
Includes:
Api::Concern
Defined in:
lib/jets/gems/exist.rb

Instance Method Summary collapse

Methods included from Api::Concern

#api

Instance Method Details

#check(gem_name) ⇒ Object

gem_name IE: nokogiri-1.1.1



6
7
8
9
10
# File 'lib/jets/gems/exist.rb', line 6

def check(gem_name)
  api.check_exist(gem_name: gem_name) # data = {"exist": ..., "available"}
rescue SocketError, OpenURI::HTTPError, OpenSSL::SSL::SSLError
  {"exist" => false, :gem_name => gem_name, :available => []}
end