Class: Bookbinder::Deploy::BlueGreenApp
- Inherits:
-
Object
- Object
- Bookbinder::Deploy::BlueGreenApp
- Defined in:
- lib/bookbinder/deploy/blue_green_app.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(name) ⇒ BlueGreenApp
constructor
A new instance of BlueGreenApp.
- #to_s ⇒ Object
- #with_flipped_name ⇒ Object
Constructor Details
#initialize(name) ⇒ BlueGreenApp
Returns a new instance of BlueGreenApp.
4 5 6 |
# File 'lib/bookbinder/deploy/blue_green_app.rb', line 4 def initialize(name) @name = name.strip end |
Instance Method Details
#==(other) ⇒ Object
8 9 10 |
# File 'lib/bookbinder/deploy/blue_green_app.rb', line 8 def ==(other) to_s == other.to_s end |
#to_s ⇒ Object
12 13 14 |
# File 'lib/bookbinder/deploy/blue_green_app.rb', line 12 def to_s name end |
#with_flipped_name ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/bookbinder/deploy/blue_green_app.rb', line 16 def with_flipped_name if name.match(/green$/) BlueGreenApp.new(name.sub(/green$/, 'blue')) else BlueGreenApp.new(name.sub(/blue$/, 'green')) end end |