Sha256: 7dfca2653a2a75fa779fee1ddf2c5e55c388f8706218066e5f249c58a1e41129

Contents?: true

Size: 613 Bytes

Versions: 183

Compression:

Stored size: 613 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.content_type, o.value, o.line)
        else
          o
        end
      end
    else
      def rubify(o)
        o
      end
    end
  end
end

Version data entries

183 entries across 180 versions & 8 rubygems

Version Path
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/gherkin-2.11.1/lib/gherkin/rubify.rb
candlepin-api-0.4.0 bundle/ruby/gems/gherkin-2.11.1/lib/gherkin/rubify.rb
candlepin-api-0.4.0 bundle/ruby/1.8/gems/gherkin-2.11.1/lib/gherkin/rubify.rb
gherkin-2.11.5 lib/gherkin/rubify.rb
gherkin-2.11.5-x86-mswin32 lib/gherkin/rubify.rb
gherkin-2.11.5-x86-mingw32 lib/gherkin/rubify.rb
gherkin-2.11.5-java lib/gherkin/rubify.rb
gherkin-2.11.4 lib/gherkin/rubify.rb
gherkin-2.11.4-x86-mswin32 lib/gherkin/rubify.rb
gherkin-2.11.4-x86-mingw32 lib/gherkin/rubify.rb
gherkin-2.11.4-java lib/gherkin/rubify.rb
gherkin-2.11.3 lib/gherkin/rubify.rb
gherkin-2.11.3-x86-mswin32 lib/gherkin/rubify.rb
gherkin-2.11.3-x86-mingw32 lib/gherkin/rubify.rb
gherkin-2.11.3-java lib/gherkin/rubify.rb
librarian-puppet-0.9.4 vendor/gems/ruby/1.8/gems/gherkin-2.11.1/lib/gherkin/rubify.rb
gherkin-2.11.2 lib/gherkin/rubify.rb
gherkin-2.11.2-x86-mswin32 lib/gherkin/rubify.rb
gherkin-2.11.2-x86-mingw32 lib/gherkin/rubify.rb
gherkin-2.11.2-java lib/gherkin/rubify.rb