Class: Array

Inherits:
Object
  • Object
show all
Defined in:
lib/logstash/java_integration.rb

Overview

this is mainly for usage with JrJackson json parsing in :raw mode which genenerates Java::JavaUtil::ArrayList and Java::JavaUtil::LinkedHashMap native objects for speed. these object already quacks like their Ruby equivalents Array and Hash but they will not test for is_a?(Array) or is_a?(Hash) and we do not want to include tests for both classes everywhere. see LogStash::JSon.

Class Method Summary collapse

Class Method Details

.===(other) ⇒ Object

enable class equivalence between Array and ArrayList so that ArrayList will work with case o when Array …



12
13
14
15
# File 'lib/logstash/java_integration.rb', line 12

def self.===(other)
  return true if other.is_a?(Java::JavaUtil::Collection)
  super
end