Class: Guard::Watcher::Pattern::Matcher
- Inherits:
-
Object
- Object
- Guard::Watcher::Pattern::Matcher
- Defined in:
- lib/guard/watcher/pattern/matcher.rb
Instance Attribute Summary collapse
-
#matcher ⇒ Object
readonly
Returns the value of attribute matcher.
Instance Method Summary collapse
-
#==(other) ⇒ true, false
Compare with other matcher.
-
#initialize(obj) ⇒ Matcher
constructor
A new instance of Matcher.
- #match(string_or_pathname) ⇒ Object
Constructor Details
#initialize(obj) ⇒ Matcher
Returns a new instance of Matcher.
7 8 9 |
# File 'lib/guard/watcher/pattern/matcher.rb', line 7 def initialize(obj) @matcher = obj end |
Instance Attribute Details
#matcher ⇒ Object (readonly)
Returns the value of attribute matcher.
5 6 7 |
# File 'lib/guard/watcher/pattern/matcher.rb', line 5 def matcher @matcher end |
Instance Method Details
#==(other) ⇒ true, false
Compare with other matcher
15 16 17 |
# File 'lib/guard/watcher/pattern/matcher.rb', line 15 def ==(other) matcher == other.matcher end |
#match(string_or_pathname) ⇒ Object
19 20 21 |
# File 'lib/guard/watcher/pattern/matcher.rb', line 19 def match(string_or_pathname) @matcher.match(normalized(string_or_pathname)) end |