Class: Linguist::And

Inherits:
Object
  • Object
show all
Defined in:
lib/linguist/heuristics.rb

Instance Method Summary collapse

Constructor Details

#initialize(pats) ⇒ And

Returns a new instance of And.



118
119
120
# File 'lib/linguist/heuristics.rb', line 118

def initialize(pats)
  @pats = pats
end

Instance Method Details

#match(input) ⇒ Object



122
123
124
# File 'lib/linguist/heuristics.rb', line 122

def match(input)
  return !@pats.any? { |pat| !pat.match(input) }
end