Sha256: 1df7f648c2b54b8e176807e348bc6d74d880d00f6b1c696102b310b28ab2bdfb

Contents?: true

Size: 597 Bytes

Versions: 66

Compression:

Stored size: 597 Bytes

Contents

module Gherkin
  module Rubify
    if defined?(JRUBY_VERSION)
      # Translate Java objects to Ruby.
      # This is especially important to convert java.util.List coming
      # from Java and back to a Ruby Array.
      def rubify(o)
        case(o)
        when Java.java.util.Collection, Array
          o.map{|e| rubify(e)}
        when Java.gherkin.formatter.model.DocString
          require 'gherkin/formatter/model'
          Formatter::Model::DocString.new(o.value, o.line)
        else
          o
        end
      end
    else
      def rubify(o)
        o
      end
    end
  end
end

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
gherkin-2.4.17 lib/gherkin/rubify.rb
gherkin-2.4.17-x86-mswin32 lib/gherkin/rubify.rb
gherkin-2.4.17-x86-mingw32 lib/gherkin/rubify.rb
gherkin-2.4.17-universal-dotnet lib/gherkin/rubify.rb
gherkin-2.4.17-java lib/gherkin/rubify.rb
gherkin-2.4.16 lib/gherkin/rubify.rb
gherkin-2.4.16-x86-mswin32 lib/gherkin/rubify.rb
gherkin-2.4.16-x86-mingw32 lib/gherkin/rubify.rb
gherkin-2.4.16-universal-dotnet lib/gherkin/rubify.rb
gherkin-2.4.16-java lib/gherkin/rubify.rb
gherkin-2.4.15 lib/gherkin/rubify.rb
gherkin-2.4.15-x86-mswin32 lib/gherkin/rubify.rb
gherkin-2.4.15-x86-mingw32 lib/gherkin/rubify.rb
gherkin-2.4.15-universal-dotnet lib/gherkin/rubify.rb
gherkin-2.4.15-java lib/gherkin/rubify.rb
gherkin-2.4.14 lib/gherkin/rubify.rb
gherkin-2.4.14-x86-mswin32 lib/gherkin/rubify.rb
gherkin-2.4.14-x86-mingw32 lib/gherkin/rubify.rb
gherkin-2.4.14-universal-dotnet lib/gherkin/rubify.rb
gherkin-2.4.14-java lib/gherkin/rubify.rb