Class: MemDB::Field::Enum::SingleMatching
- Inherits:
-
Object
- Object
- MemDB::Field::Enum::SingleMatching
- Includes:
- Matching
- Defined in:
- lib/mem_db/field/enum.rb
Instance Method Summary collapse
-
#initialize(el) ⇒ SingleMatching
constructor
A new instance of SingleMatching.
- #match?(values) ⇒ Boolean
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
30 31 32 |
# File 'lib/mem_db/field/enum.rb', line 30 def match?(values) values.include?(@el) end |