Class: PGArrays::PgIncludes

Inherits:
PgArray show all
Defined in:
lib/ar_pg_array/querying.rb,
lib/ar_pg_array/querying.rb

Instance Attribute Summary

Attributes inherited from PgArray

#base_type

Instance Method Summary collapse

Methods inherited from PgArray

#initialize

Methods inherited from Array

#pg, #search_all, #search_any, #search_subarray

Constructor Details

This class inherits a constructor from PGArrays::PgArray

Instance Method Details

#include?(v) ⇒ Boolean

Returns:

  • (Boolean)


62
63
64
# File 'lib/ar_pg_array/querying.rb', line 62

def include?(v)
  Array === v && (v - self).empty?
end