Class: Guard::Watcher::Pattern::SimplePath
- Inherits:
-
Object
- Object
- Guard::Watcher::Pattern::SimplePath
- Defined in:
- lib/guard/watcher/pattern/simple_path.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(string_or_pathname) ⇒ SimplePath
constructor
A new instance of SimplePath.
- #match(string_or_pathname) ⇒ Object
Constructor Details
#initialize(string_or_pathname) ⇒ SimplePath
Returns a new instance of SimplePath.
5 6 7 |
# File 'lib/guard/watcher/pattern/simple_path.rb', line 5 def initialize(string_or_pathname) @path = normalize(string_or_pathname) end |
Instance Method Details
#match(string_or_pathname) ⇒ Object
9 10 11 12 13 |
# File 'lib/guard/watcher/pattern/simple_path.rb', line 9 def match(string_or_pathname) cleaned = normalize(string_or_pathname) return nil unless @path == cleaned [cleaned] end |