Sha256: 47a1117f63e0b2fd89162a336b74733df8ba400c0e5c87438807fc3b40288bfc
Contents?: true
Size: 727 Bytes
Versions: 12
Compression:
Stored size: 727 Bytes
Contents
# -*- coding: utf-8 -*- require 'turnip_formatter/step' module TurnipFormatter class Step module DSL # # @param [TurnipFormatter::Step] step # def extended(step) templates.each do |style, template| step.docs[style] = { klass: template[:klass], value: step.instance_eval(&template[:block]) } end end def add_template(klass, &block) ::TurnipFormatter::Step.add_template(status, klass, &block) end def remove_template(klass) ::TurnipFormatter::Step.remove_template(status, klass) end def templates ::TurnipFormatter::Step.templates[status] || [] end end end end
Version data entries
12 entries across 12 versions & 1 rubygems