Sha256: c6dd9ce2cfbc30aad39014caf737bd47b209e2e6ebb5edbc0078972fcf5501c8
Contents?: true
Size: 861 Bytes
Versions: 29
Compression:
Stored size: 861 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 rubified_array = o.map{ |e| rubify(e) } if o.respond_to?(:line) class << rubified_array attr_accessor :line end rubified_array.line = o.line end rubified_array 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
29 entries across 27 versions & 3 rubygems