Sha256: 2fd02bd03ea6161b3a4d9d493cd5e85e2f378a34bc5766c3abdb267a1812fa84

Contents?: true

Size: 470 Bytes

Versions: 5

Compression:

Stored size: 470 Bytes

Contents

module Runbook::Extensions
  module Sections
    module DSL
      def section(title, *tags, labels: {}, &block)
        Runbook::Entities::Section.new(
          title,
          tags: tags,
          labels: labels,
        ).tap do |section|
          parent.add(section)
          section.dsl.instance_eval(&block)
        end
      end
    end
  end

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

Version data entries

5 entries across 5 versions & 2 rubygems

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