Sha256: c8babc3203d3474bf9666b430986d78d96d70225a0f12fa588adf9d61ba0f672

Contents?: true

Size: 595 Bytes

Versions: 133

Compression:

Stored size: 595 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.PyString
          require 'gherkin/formatter/model'
          Formatter::Model::PyString.new(o.value, o.line)
        else
          o
        end
      end
    else
      def rubify(o)
        o
      end
    end
  end
end

Version data entries

133 entries across 133 versions & 4 rubygems

Version Path
resque-pool-0.3.0 vendor/bundle/ruby/1.8/gems/gherkin-2.3.3/lib/gherkin/rubify.rb
resque-pool-0.3.0.beta.2 vendor/bundle/ruby/1.8/gems/gherkin-2.3.3/lib/gherkin/rubify.rb
gherkin-2.3.10-x86-mswin32 lib/gherkin/rubify.rb
gherkin-2.3.10-x86-mingw32 lib/gherkin/rubify.rb
gherkin-2.3.10-universal-dotnet lib/gherkin/rubify.rb
gherkin-2.3.10-java lib/gherkin/rubify.rb
gherkin-2.3.9-x86-mswin32 lib/gherkin/rubify.rb
gherkin-2.3.9-x86-mingw32 lib/gherkin/rubify.rb
gherkin-2.3.9-universal-dotnet lib/gherkin/rubify.rb
gherkin-2.3.9-java lib/gherkin/rubify.rb
gherkin-2.3.8-x86-mswin32 lib/gherkin/rubify.rb
gherkin-2.3.8-x86-mingw32 lib/gherkin/rubify.rb
gherkin-2.3.8-universal-dotnet lib/gherkin/rubify.rb
gherkin-2.3.8-java lib/gherkin/rubify.rb
gherkin-2.3.7 lib/gherkin/rubify.rb
gherkin-2.3.7-x86-mswin32 lib/gherkin/rubify.rb
gherkin-2.3.7-x86-mingw32 lib/gherkin/rubify.rb
gherkin-2.3.7-universal-dotnet lib/gherkin/rubify.rb
gherkin-2.3.7-java lib/gherkin/rubify.rb
benhamill-gherkin-2.3.5 lib/gherkin/rubify.rb