Class: Jira::Command::Checkout
- Defined in:
- lib/jira/commands/checkout.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#ticket ⇒ Object
Returns the value of attribute ticket.
Instance Method Summary collapse
-
#initialize(ticket, options) ⇒ Checkout
constructor
A new instance of Checkout.
- #run ⇒ Object
Constructor Details
#initialize(ticket, options) ⇒ Checkout
Returns a new instance of Checkout.
17 18 19 20 |
# File 'lib/jira/commands/checkout.rb', line 17 def initialize(ticket, ) self.ticket = ticket self. = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
15 16 17 |
# File 'lib/jira/commands/checkout.rb', line 15 def @options end |
#ticket ⇒ Object
Returns the value of attribute ticket.
15 16 17 |
# File 'lib/jira/commands/checkout.rb', line 15 def ticket @ticket end |
Instance Method Details
#run ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/jira/commands/checkout.rb', line 22 def run return unless Jira::Core.ticket?(ticket) return if .empty? unless ['errorMessages'].nil? on_failure return end unless remote? on_failure return end create_branch unless branches.include?(ticket) checkout_branch reset_branch unless branches.include?(ticket) on_success end |