Class: GitRunner::Base
- Inherits:
-
Object
- Object
- GitRunner::Base
- Defined in:
- lib/git-runner/base.rb
Instance Attribute Summary collapse
-
#current_branch ⇒ Object
Returns the value of attribute current_branch.
-
#refs ⇒ Object
Returns the value of attribute refs.
Instance Method Summary collapse
-
#initialize(refs = []) ⇒ Base
constructor
A new instance of Base.
- #run ⇒ Object
Constructor Details
#initialize(refs = []) ⇒ Base
Returns a new instance of Base.
6 7 8 |
# File 'lib/git-runner/base.rb', line 6 def initialize(refs=[]) self.refs = refs end |
Instance Attribute Details
#current_branch ⇒ Object
Returns the value of attribute current_branch.
3 4 5 |
# File 'lib/git-runner/base.rb', line 3 def current_branch @current_branch end |
#refs ⇒ Object
Returns the value of attribute refs.
3 4 5 |
# File 'lib/git-runner/base.rb', line 3 def refs @refs end |
Instance Method Details
#run ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/git-runner/base.rb', line 10 def run begin Text.begin load_git_runner_gems prepare_environment process_refs rescue GitRunner::Instruction::Failure => ex handle_instruction_failure_exception(ex) rescue GitRunner::Command::Failure => ex handle_command_failure_exception(ex) rescue Exception => ex handle_unknown_exception(ex) ensure join_threads Text.finish end end |