Class: Ace::Git::CLI::Commands::Branch
- Inherits:
-
Support::Cli::Command
- Object
- Support::Cli::Command
- Ace::Git::CLI::Commands::Branch
- Includes:
- Support::Cli::Base
- Defined in:
- lib/ace/git/cli/commands/branch.rb
Overview
ace-support-cli command for showing branch information
Instance Method Summary collapse
Instance Method Details
#call(**options) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/ace/git/cli/commands/branch.rb', line 24 def call(**) # Get branch info branch_info = Molecules::BranchReader.full_info if branch_info[:error] raise Ace::Support::Cli::Error.new(branch_info[:error]) end # Output based on format case [:format] when "json" puts JSON.pretty_generate(branch_info) else output_text(branch_info) end rescue Ace::Git::Error => e raise Ace::Support::Cli::Error.new(e.) end |