Class: FlightPlanCli::Commands::Checkout
- Inherits:
-
Object
- Object
- FlightPlanCli::Commands::Checkout
- Includes:
- FlightPlanCli::Config
- Defined in:
- lib/flight_plan_cli/commands/checkout.rb
Instance Method Summary collapse
-
#initialize ⇒ Checkout
constructor
A new instance of Checkout.
- #process(issue) ⇒ Object
Constructor Details
#initialize ⇒ Checkout
Returns a new instance of Checkout.
6 7 8 |
# File 'lib/flight_plan_cli/commands/checkout.rb', line 6 def initialize read_config end |
Instance Method Details
#process(issue) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/flight_plan_cli/commands/checkout.rb', line 10 def process(issue) puts "Checking out branch for #{issue}" local_branch_for(issue) || remote_branch_for(issue) || new_branch_for(issue) rescue Rugged::CheckoutError => e puts "Unable to checkout: #{e.}".red end |