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
frameworks-capybara-0.2.0.rc4 vendor/bundle/ruby/1.8/gems/gherkin-2.9.3/lib/gherkin/rubify.rb
frameworks-capybara-0.2.0.rc3 vendor/bundle/ruby/1.8/gems/gherkin-2.9.3/lib/gherkin/rubify.rb
frameworks-capybara-0.2.0.rc2 vendor/bundle/ruby/1.8/gems/gherkin-2.9.3/lib/gherkin/rubify.rb
resque-pool-0.3.0.beta.2 vendor/bundle/ruby/1.8/gems/gherkin-2.9.0/lib/gherkin/rubify.rb
gherkin-2.9.3 lib/gherkin/rubify.rb
gherkin-2.9.3-x86-mswin32 lib/gherkin/rubify.rb
gherkin-2.9.3-x86-mingw32 lib/gherkin/rubify.rb
gherkin-2.9.3-java lib/gherkin/rubify.rb
gherkin-2.9.2 lib/gherkin/rubify.rb
gherkin-2.9.2-x86-mswin32 lib/gherkin/rubify.rb
gherkin-2.9.2-x86-mingw32 lib/gherkin/rubify.rb
gherkin-2.9.2-java lib/gherkin/rubify.rb
gherkin-2.9.1 lib/gherkin/rubify.rb
gherkin-2.9.1-x86-mswin32 lib/gherkin/rubify.rb
gherkin-2.9.1-x86-mingw32 lib/gherkin/rubify.rb
gherkin-2.9.1-java lib/gherkin/rubify.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/gherkin-2.9.0/lib/gherkin/rubify.rb
gherkin-2.9.0 lib/gherkin/rubify.rb
gherkin-2.9.0-x86-mswin32 lib/gherkin/rubify.rb
gherkin-2.9.0-x86-mingw32 lib/gherkin/rubify.rb