Class: Semaph::Shells::Workflow::PipelinesListCommand
- Inherits:
-
Object
- Object
- Semaph::Shells::Workflow::PipelinesListCommand
- Defined in:
- lib/semaph/shells/workflow/pipelines_list_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(_whatever) ⇒ Object
-
#initialize(pipeline_collection) ⇒ PipelinesListCommand
constructor
A new instance of PipelinesListCommand.
Constructor Details
#initialize(pipeline_collection) ⇒ PipelinesListCommand
Returns a new instance of PipelinesListCommand.
9 10 11 12 |
# File 'lib/semaph/shells/workflow/pipelines_list_command.rb', line 9 def initialize(pipeline_collection) @pipeline_collection = pipeline_collection @help = "list pipelines" end |
Instance Attribute Details
#help ⇒ Object (readonly)
Returns the value of attribute help.
7 8 9 |
# File 'lib/semaph/shells/workflow/pipelines_list_command.rb', line 7 def help @help end |
#usage ⇒ Object (readonly)
Returns the value of attribute usage.
7 8 9 |
# File 'lib/semaph/shells/workflow/pipelines_list_command.rb', line 7 def usage @usage end |
Instance Method Details
#execute(_whatever) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/semaph/shells/workflow/pipelines_list_command.rb', line 14 def execute(_whatever) @pipeline_collection.reload @pipeline_collection.all.each_with_index do |pipeline, index| puts [::Semaph::Formatting.index(index + 1), pipeline.description].join(" ") end end |