Class: EndsWithFilter
- Inherits:
-
Object
- Object
- EndsWithFilter
- Defined in:
- lib/filters/ends_with_filter.rb
Instance Method Summary collapse
- #complete ⇒ Object
- #filter(file_name) ⇒ Object
-
#initialize(text) ⇒ EndsWithFilter
constructor
A new instance of EndsWithFilter.
Constructor Details
#initialize(text) ⇒ EndsWithFilter
Returns a new instance of EndsWithFilter.
6 7 8 |
# File 'lib/filters/ends_with_filter.rb', line 6 def initialize(text) @text = text.downcase end |
Instance Method Details
#complete ⇒ Object
14 15 |
# File 'lib/filters/ends_with_filter.rb', line 14 def complete end |
#filter(file_name) ⇒ Object
10 11 12 |
# File 'lib/filters/ends_with_filter.rb', line 10 def filter(file_name) return file_name.downcase.ends_with?(@text) end |