Class: Linguist::And
- Inherits:
-
Object
- Object
- Linguist::And
- Defined in:
- lib/linguist/heuristics.rb
Instance Method Summary collapse
-
#initialize(pats) ⇒ And
constructor
A new instance of And.
- #match(input) ⇒ Object
Constructor Details
#initialize(pats) ⇒ And
Returns a new instance of And.
142 143 144 |
# File 'lib/linguist/heuristics.rb', line 142 def initialize(pats) @pats = pats end |
Instance Method Details
#match(input) ⇒ Object
146 147 148 |
# File 'lib/linguist/heuristics.rb', line 146 def match(input) return !@pats.any? { |pat| !pat.match(input) } end |