Class: GitRecent::Cli
- Inherits:
-
Thor
- Object
- Thor
- GitRecent::Cli
- Defined in:
- lib/git_recent/cli.rb
Instance Method Summary collapse
Instance Method Details
#checkout ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/git_recent/cli.rb', line 15 def checkout chooser = GitRecent::BranchChooser.new recent_branch_names selected_branch = chooser.request_choice if selected_branch Git.open('.').checkout(selected_branch) end end |
#list ⇒ Object
8 9 10 11 12 |
# File 'lib/git_recent/cli.rb', line 8 def list recent_branch_names.each do |branch_name| puts branch_name end end |