Sha256: 3980beced1e3589b12f729ebac0d6747c701313d13f790a796f2e50566dbb373
Contents?: true
Size: 1.28 KB
Versions: 6
Compression:
Stored size: 1.28 KB
Contents
# frozen_string_literal: true module InstallGemLocal class Navigation class << self def start options = { 'a' => { 'value' => 'remove_gem', 'display' => I18n.t('action.remove_gem.display') }, 'b' => { 'value' => 'build_gem', 'display' => I18n.t('action.build_gem.display') }, 'c' => { 'value' => 'install_gem', 'display' => I18n.t('action.install_gem.display') }, 'd' => { 'value' => 'copy_gem', 'display' => I18n.t('action.copy_gem.display') }, 'e' => { 'value' => 'push_gem', 'display' => I18n.t('action.push_gem.display') }, 'f' => { 'value' => 'till_install', 'display' => I18n.t('action.till_install.display') }, 'g' => { 'value' => 'till_copy', 'display' => I18n.t('action.till_copy.display') }, '/' => { 'value' => 'exit', 'display' => 'Exit' } } selection = InstallGemLocal::Helper.prompt_options( flash_message: InstallGemLocal::Helper.flash_message(title: 'Select Action'), options: options ) unless selection == 'exit' InstallGemLocal::Action.send(selection.to_sym) #InstallGemLocal::Navigation.start end rescue StandardError => e ap e ap I18n.t('something_wrong') end end end end
Version data entries
6 entries across 6 versions & 1 rubygems