Module: Runbook::Extensions::Steps::DSL
- Defined in:
- lib/runbook/extensions/steps.rb
Instance Method Summary collapse
Instance Method Details
#step(title = nil, *tags, labels: {}, &block) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/runbook/extensions/steps.rb', line 4 def step(title=nil, *, labels: {}, &block) if title.is_a?(Symbol) .unshift(title) title = nil end Runbook::Entities::Step.new( title, tags: , labels: labels, ).tap do |step| parent.add(step) step.dsl.instance_eval(&block) if block end end |