Class: MemDB::Field::Enum::MultiMatching

Inherits:
Object
  • Object
show all
Includes:
Matching
Defined in:
lib/mem_db/field/enum.rb

Instance Method Summary collapse

Constructor Details

#initialize(arr) ⇒ MultiMatching

Returns a new instance of MultiMatching.



14
15
16
# File 'lib/mem_db/field/enum.rb', line 14

def initialize(arr)
  @arr = arr
end

Instance Method Details

#match?(values) ⇒ Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/mem_db/field/enum.rb', line 18

def match?(values)
  values.any? { |el| @arr.include?(el) }
end