Class: Afterlife::Release::Helper
- Inherits:
-
Object
- Object
- Afterlife::Release::Helper
- Defined in:
- lib/afterlife/release/helper.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#cli ⇒ Object
readonly
Returns the value of attribute cli.
Class Method Summary collapse
Instance Method Summary collapse
- #git ⇒ Object
-
#initialize(cli, args) ⇒ Helper
constructor
A new instance of Helper.
Constructor Details
#initialize(cli, args) ⇒ Helper
Returns a new instance of Helper.
16 17 18 19 |
# File 'lib/afterlife/release/helper.rb', line 16 def initialize(cli, args) args.compact! @cli = cli end |
Instance Attribute Details
#cli ⇒ Object (readonly)
Returns the value of attribute cli.
14 15 16 |
# File 'lib/afterlife/release/helper.rb', line 14 def cli @cli end |
Class Method Details
.call(cli, args) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/afterlife/release/helper.rb', line 6 def self.call(cli, args) new(cli, args).call rescue Git::GitExecuteError => e cli.fatal! e..chomp.split(':').last.strip rescue Interrupt cli.log_interrupted end |
Instance Method Details
#git ⇒ Object
21 22 23 |
# File 'lib/afterlife/release/helper.rb', line 21 def git @git ||= Git.open('.') end |