Sha256: 19593fe770523df0f4e7ee5ca297151c3baeff2709ec494418522a032a43805e

Contents?: true

Size: 580 Bytes

Versions: 3

Compression:

Stored size: 580 Bytes

Contents

# frozen_string_literal: true

module InstallGemLocal
  module InstallGem
    def install_gem
      puts ''
      puts 'Install Gem'.green
      files_exists = file_names
      if files_exists.count > 1
        install_gem_from_path(multiple_version_selection(title_interpol: 'TO Install'))
      elsif files_exists.count == 1
        install_gem_from_path(files_exists.first)
      else
        ap 'Gem not exist'
      end
    end

    def install_gem_from_path(file_name)
      return if file_name == 'exit'

      tty_command.run("gem install #{file_name}")
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
install_gem_local-1.0.1 lib/install_gem_local/action/install_gem.rb
install_gem_local-1.0.0 lib/install_gem_local/action/install_gem.rb
install_gem_local-0.1.20 lib/install_gem_local/action/install_gem.rb