Class: Gitloggl::Commands::Main

Inherits:
Gitloggl::Command show all
Defined in:
lib/gitloggl/commands/main.rb

Instance Attribute Summary

Attributes inherited from Gitloggl::Command

#back, #options

Instance Method Summary collapse

Methods inherited from Gitloggl::Command

#back?, #capture_back, #command, #config, #cursor, #editor, #exec_exist?, #generator, #initialize, #menu_back, #pager, #pastel, #platform, #prompt, #render_table, #screen, #verbose?, #which

Constructor Details

This class inherits a constructor from Gitloggl::Command

Instance Method Details

#executeObject



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/gitloggl/commands/main.rb', line 6

def execute(*)
  action = prompt.select('') do |menu|
    menu.enum ')'
    menu.choice 'SYNC', Sync
    menu.choice 'Manage Integrations', ManageIntegration
    menu.choice 'Check For Updates', Update
  end

  action.new(options) do |a|
    a.back = capture_back
    a.execute
  end
end