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
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/gherkin-2.12.2/lib/gherkin/formatter/step_printer.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/gherkin-2.12.2/lib/gherkin/formatter/step_printer.rb
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/gherkin-2.12.2/lib/gherkin/formatter/step_printer.rb
gherkin-2.12.2 lib/gherkin/formatter/step_printer.rb
gherkin-2.12.2-x86-mswin32 lib/gherkin/formatter/step_printer.rb
gherkin-2.12.2-x86-mingw32 lib/gherkin/formatter/step_printer.rb
gherkin-2.12.2-java lib/gherkin/formatter/step_printer.rb
candlepin-api-0.4.0 bundle/ruby/1.8/gems/gherkin-2.11.1/lib/gherkin/formatter/step_printer.rb
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/gherkin-2.11.1/lib/gherkin/formatter/step_printer.rb
candlepin-api-0.4.0 bundle/ruby/gems/gherkin-2.11.1/lib/gherkin/formatter/step_printer.rb
gherkin-2.12.1 lib/gherkin/formatter/step_printer.rb
gherkin-2.12.1-x86-mswin32 lib/gherkin/formatter/step_printer.rb
gherkin-2.12.1-x86-mingw32 lib/gherkin/formatter/step_printer.rb
gherkin-2.12.1-java lib/gherkin/formatter/step_printer.rb
librarian-puppet-0.9.9 vendor/gems/ruby/1.9.1/gems/gherkin-2.11.6/lib/gherkin/formatter/step_printer.rb
gherkin-2.12.0 lib/gherkin/formatter/step_printer.rb
gherkin-2.12.0-x86-mingw32 lib/gherkin/formatter/step_printer.rb
gherkin-2.12.0-x86-mswin32 lib/gherkin/formatter/step_printer.rb
gherkin-2.12.0-java lib/gherkin/formatter/step_printer.rb
gherkin-2.11.8 lib/gherkin/formatter/step_printer.rb