Sha256: 8c1d1911ad281b362064b8c3cdae6cac20cff8a5b54f3d6e446bf84047f5f152
Contents?: true
Size: 892 Bytes
Versions: 10
Compression:
Stored size: 892 Bytes
Contents
require 'turnip_formatter/printer' require 'turnip_formatter/printer/step_extra_args' module TurnipFormatter module Printer class Step class << self include TurnipFormatter::Printer def print_out(step) render_template(:step, { step: step, step_docs: documents(step.docs) }) end private def documents(docs) docs.map do |style, template| if style == :extra_args TurnipFormatter::Printer::StepExtraArgs.print_out(template[:value]) else # # Template class which is registered in # +Step::Failure.add_template+ # +Step::Pending.add_template+ # be called. # template[:klass].build(template[:value]) end end.join("\n") end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems