Module: Gherkin::Rubify

Included in:
Formatter::JSONFormatter, I18n
Defined in:
lib/gherkin/rubify.rb

Instance Method Summary collapse

Instance Method Details

#rubify(o) ⇒ Object

Translate Java objects to Ruby. This is especially important to convert java.util.List coming from Java and back to a Ruby Array.



7
8
9
10
11
12
13
# File 'lib/gherkin/rubify.rb', line 7

def rubify(o)
  if Java.java.util.Collection === o || Array === o
    o.map{|e| rubify(e)}
  else
    o
  end
end