Class: Buildkite::Pipeline
- Inherits:
-
Object
- Object
- Buildkite::Pipeline
- Defined in:
- lib/buildkite.rb
Overview
Here is a comment.
Instance Method Summary collapse
-
#add_step(step) ⇒ self
Adds a step to the pipeline.
-
#initialize ⇒ Pipeline
constructor
A new instance of Pipeline.
- #to_json(*_args) ⇒ Object
- #to_yaml ⇒ Object
Constructor Details
#initialize ⇒ Pipeline
Returns a new instance of Pipeline.
11 12 13 |
# File 'lib/buildkite.rb', line 11 def initialize @steps = [] end |
Instance Method Details
#add_step(step) ⇒ self
Adds a step to the pipeline.
29 30 31 32 |
# File 'lib/buildkite.rb', line 29 def add_step(step) @steps << step self end |
#to_json(*_args) ⇒ Object
34 35 36 |
# File 'lib/buildkite.rb', line 34 def to_json(*_args) JSON.pretty_generate({ steps: @steps }, indent: " ") end |
#to_yaml ⇒ Object
38 39 40 |
# File 'lib/buildkite.rb', line 38 def to_yaml { steps: @steps }.to_yaml end |