Class: MemDB::Field::Enum::SingleMatching

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

Instance Method Summary collapse

Constructor Details

#initialize(el) ⇒ SingleMatching

Returns a new instance of SingleMatching.



26
27
28
# File 'lib/mem_db/field/enum.rb', line 26

def initialize(el)
  @el = el
end

Instance Method Details

#match?(values) ⇒ Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/mem_db/field/enum.rb', line 30

def match?(values)
  values.include?(@el)
end