class Pry::Command::GemInstall - pry-0.10.1 Documentation

# class Pry::Command::GemInstall

### Public Instance Methods

process(gem) click to toggle source

    # File lib/pry/commands/gem_install.rb, line 21
    def process(gem)
      Rubygem.install(gem)
      output.puts "Gem `#{ text.green(gem) }` installed."
      require gem
    rescue LoadError
      require_path = gem.split('-').join('/')
      require require_path
    end

setup() click to toggle source

    # File lib/pry/commands/gem_install.rb, line 17
    def setup
      require 'rubygems/dependency_installer' unless defined? Gem::DependencyInstaller
    end