Sha256: 1848a07bb8d9c67b22c77ff12d6d8d66c2d9ab2f8b267a629c992f9bababaa63

Contents?: true

Size: 481 Bytes

Versions: 1

Compression:

Stored size: 481 Bytes

Contents

# -*- coding: utf-8 -*-

require 'turnip_formatter/step'

module TurnipFormatter
  class Step
    module DSL
      #
      # @param [TurnipFormatter::Step]  step
      #
      def extended(step)
        ::TurnipFormatter::Step.templates[status].each do |style, block|
          step.docs[style] = step.instance_eval(&block)
        end
      end

      def add_template(style, &block)
        ::TurnipFormatter::Step.add_template(status, style, &block)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
turnip_formatter-0.0.4 lib/turnip_formatter/step/dsl.rb