Class: Octopolo::Scripts::StaleBranches
- Inherits:
-
Object
- Object
- Octopolo::Scripts::StaleBranches
- Includes:
- CLIWrapper, ConfigWrapper, GitWrapper
- Defined in:
- lib/octopolo/scripts/stale_branches.rb
Constant Summary collapse
- DEFAULT_BRANCHES =
%W(HEAD master staging production)
Instance Attribute Summary collapse
-
#delete ⇒ Object
(also: #delete?)
Returns the value of attribute delete.
Attributes included from GitWrapper
Attributes included from ConfigWrapper
Attributes included from CLIWrapper
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(delete = false) ⇒ StaleBranches
constructor
A new instance of StaleBranches.
Constructor Details
#initialize(delete = false) ⇒ StaleBranches
Returns a new instance of StaleBranches.
16 17 18 |
# File 'lib/octopolo/scripts/stale_branches.rb', line 16 def initialize(delete=false) @delete = delete end |
Instance Attribute Details
#delete ⇒ Object Also known as: delete?
Returns the value of attribute delete.
11 12 13 |
# File 'lib/octopolo/scripts/stale_branches.rb', line 11 def delete @delete end |
Instance Method Details
#execute ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/octopolo/scripts/stale_branches.rb', line 20 def execute if delete? delete_stale_branches else display_stale_branches end end |