Sha256: c50409315df9375129f0b38cd6e799a23bce9a1876d62a21829384172791ec42

Contents?: true

Size: 555 Bytes

Versions: 5

Compression:

Stored size: 555 Bytes

Contents

module Runbook::Extensions
  module Steps
    module DSL
      def step(title=nil, *tags, labels: {}, &block)
        if title.is_a?(Symbol)
          tags.unshift(title)
          title = nil
        end

        Runbook::Entities::Step.new(
          title,
          tags: tags,
          labels: labels,
        ).tap do |step|
          parent.add(step)
          step.dsl.instance_eval(&block) if block
        end
      end
    end
  end

  Runbook::Entities::Book::DSL.prepend(Steps::DSL)
  Runbook::Entities::Section::DSL.prepend(Steps::DSL)
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
careacademy-runbook-1.2.0 lib/runbook/extensions/steps.rb
runbook-1.1.0 lib/runbook/extensions/steps.rb
runbook-1.0.0 lib/runbook/extensions/steps.rb
runbook-0.16.1 lib/runbook/extensions/steps.rb
runbook-0.16.0 lib/runbook/extensions/steps.rb