Methods

Kernel

Extension to Kernel to add # without any exceptions raised

Public Instance Methods

gem_present?(gem_name, version = nil) click to toggle source

Returns whether or not a gem exists without raising a Gem::LoadError exception

    # File lib/twitter/ext/stdlib.rb, line 42
42:   def gem_present?(gem_name, version = nil)
43:     present = false
44:     begin
45:       present = !!(version ? gem(gem_name, version) : gem(gem_name))
46:     rescue Gem::LoadError => le
47:       present = false
48:       warn("Gem load error: Couldn't load #{gem_name} #{version ? "with version requirement #{version}: #{le.to_s}": ""}")
49:     end
50:     present
51:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.