Class: FlightPlanCli::Commands::Checkout
- Inherits:
-
Object
- Object
- FlightPlanCli::Commands::Checkout
- Defined in:
- lib/flight_plan_cli/commands/checkout.rb
Instance Method Summary collapse
-
#initialize(issue_no) ⇒ Checkout
constructor
A new instance of Checkout.
- #process ⇒ Object
Methods included from FlightPlanCli::Clients::FlightPlan
Methods included from FlightPlanCli::Clients::Git
Constructor Details
#initialize(issue_no) ⇒ Checkout
Returns a new instance of Checkout.
7 8 9 10 |
# File 'lib/flight_plan_cli/commands/checkout.rb', line 7 def initialize(issue_no) @issue_no = issue_no @fetched = false end |
Instance Method Details
#process ⇒ Object
12 13 14 15 16 17 |
# File 'lib/flight_plan_cli/commands/checkout.rb', line 12 def process local_branch_for_issue || remote_branch_for_issue || new_branch_for_issue rescue Git::GitExecuteError => e puts 'Unable to checkout'.red puts e..yellow end |