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