Class: Semaph::Shells::Pipeline::PromoteCommand
- Inherits:
-
Object
- Object
- Semaph::Shells::Pipeline::PromoteCommand
- Defined in:
- lib/semaph/shells/pipeline/promote_command.rb
Instance Attribute Summary collapse
-
#help ⇒ Object
readonly
Returns the value of attribute help.
-
#usage ⇒ Object
readonly
Returns the value of attribute usage.
Instance Method Summary collapse
- #execute(name) ⇒ Object
-
#initialize(pipeline) ⇒ PromoteCommand
constructor
A new instance of PromoteCommand.
Constructor Details
#initialize(pipeline) ⇒ PromoteCommand
Returns a new instance of PromoteCommand.
7 8 9 10 11 |
# File 'lib/semaph/shells/pipeline/promote_command.rb', line 7 def initialize(pipeline) @pipeline = pipeline @usage = "<promotion name>" @help = "promote pipeline" end |
Instance Attribute Details
#help ⇒ Object (readonly)
Returns the value of attribute help.
5 6 7 |
# File 'lib/semaph/shells/pipeline/promote_command.rb', line 5 def help @help end |
#usage ⇒ Object (readonly)
Returns the value of attribute usage.
5 6 7 |
# File 'lib/semaph/shells/pipeline/promote_command.rb', line 5 def usage @usage end |
Instance Method Details
#execute(name) ⇒ Object
13 14 15 16 17 |
# File 'lib/semaph/shells/pipeline/promote_command.rb', line 13 def execute(name) @pipeline.promote(name.chomp.strip) rescue ::Semaph::Client::RequestException => e puts e. end |