install_task (Thor)

    # File lib/thor/tasks.rb, line 14
      def self.install_task(spec)
        package_task spec

        null, sudo, gem = RUBY_PLATFORM =~ /w(in)?32$/ ? ['NUL', '', 'gem.bat'] :
                                                         ['/dev/null', 'sudo', 'gem']

        desc "install", "install the gem"
        define_method :install do
          old_stderr, $stderr = $stderr.dup, File.open(null, "w")
          package
          $stderr = old_stderr
          system %{#{sudo} #{Gem.ruby} -S #{gem} install pkg/#{spec.name}-#{spec.version} --no-rdoc --no-ri --no-update-sources}
        end
      end