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.
144 145 146 |
# File 'lib/linguist/heuristics.rb', line 144 def initialize(pats) @pats = pats end |
Instance Method Details
#match(input) ⇒ Object
148 149 150 |
# File 'lib/linguist/heuristics.rb', line 148 def match(input) return !@pats.any? { |pat| !pat.match(input) } end |