Sha256: dc4570b294acaca2be2ef4e9f49074d97b8de13c53b5000fb38b34e7be09e002

Contents?: true

Size: 728 Bytes

Versions: 65

Compression:

Stored size: 728 Bytes

Contents

module Gherkin
  module Formatter
    class StepPrinter
      def write_step(io, text_format, arg_format, step_name, arguments)
        unpacked_step_name = step_name.unpack("U*")
        
        text_start = 0
        arguments.each do |arg|
          if(arg.offset != 0 && !arg.offset.nil?)
            io.write(text_format.text(unpacked_step_name[text_start..arg.offset-1].pack("U*")))
          end
          if(!arg.val.nil?)
            io.write(arg_format.text(arg.val))
            text_start = arg.offset + arg.val.unpack("U*").length
          end
        end
        io.write(text_format.text(unpacked_step_name[text_start..-1].pack("U*"))) unless text_start == unpacked_step_name.length
      end
    end
  end
end

Version data entries

65 entries across 61 versions & 6 rubygems

Version Path
ftl-0.2.0 vendor/bundle/gems/gherkin-2.10.0/lib/gherkin/formatter/step_printer.rb
gherkin-2.10.0 lib/gherkin/formatter/step_printer.rb
gherkin-2.10.0-x86-mswin32 lib/gherkin/formatter/step_printer.rb
gherkin-2.10.0-x86-mingw32 lib/gherkin/formatter/step_printer.rb
gherkin-2.10.0-java lib/gherkin/formatter/step_printer.rb