Module: InstallGemLocal::InstallGem
- Included in:
- Action
- Defined in:
- lib/install_gem_local/action/install_gem.rb
Instance Method Summary collapse
Instance Method Details
#install_gem ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/install_gem_local/action/install_gem.rb', line 5 def install_gem puts '' puts 'Install Gem'.green files_exists = file_names if files_exists.count > 1 install_gem_from_path(multiple_version_selection) elsif files_exists.count == 1 install_gem_from_path(files_exists.first) else ap 'Gem not exist' end end |
#install_gem_from_path(file_name) ⇒ Object
18 19 20 21 22 |
# File 'lib/install_gem_local/action/install_gem.rb', line 18 def install_gem_from_path(file_name) return if file_name == 'exit' tty_command.run("gem install #{file_name}") end |