Class: Veksel::Suffix
- Inherits:
-
Object
- Object
- Veksel::Suffix
- Defined in:
- lib/veksel/suffix.rb
Constant Summary collapse
- PROTECTED_BRANCHES =
%w[master main].freeze
Instance Method Summary collapse
-
#initialize(branch_name) ⇒ Suffix
constructor
A new instance of Suffix.
- #to_s ⇒ Object
Constructor Details
#initialize(branch_name) ⇒ Suffix
Returns a new instance of Suffix.
5 6 7 |
# File 'lib/veksel/suffix.rb', line 5 def initialize(branch_name) @branch_name = branch_name end |
Instance Method Details
#to_s ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/veksel/suffix.rb', line 9 def to_s case @branch_name when 'HEAD' when *PROTECTED_BRANCHES "" else @branch_name end end |