Class: MemDB::Field::Pattern::Pattern::Suffix
- Inherits:
-
Object
- Object
- MemDB::Field::Pattern::Pattern::Suffix
- Defined in:
- lib/mem_db/field/pattern.rb
Instance Method Summary collapse
-
#initialize(suffix) ⇒ Suffix
constructor
A new instance of Suffix.
- #match?(str) ⇒ Boolean
Constructor Details
#initialize(suffix) ⇒ Suffix
Returns a new instance of Suffix.
49 50 51 |
# File 'lib/mem_db/field/pattern.rb', line 49 def initialize(suffix) @suffix = suffix end |
Instance Method Details
#match?(str) ⇒ Boolean
53 54 55 |
# File 'lib/mem_db/field/pattern.rb', line 53 def match?(str) str.end_with?(@suffix) end |