Class: Linguist::NegativePattern

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

Instance Method Summary collapse

Constructor Details

#initialize(pat) ⇒ NegativePattern

Returns a new instance of NegativePattern.



162
163
164
# File 'lib/linguist/heuristics.rb', line 162

def initialize(pat)
  @pat = pat
end

Instance Method Details

#match?(input) ⇒ Boolean

Returns:

  • (Boolean)


166
167
168
# File 'lib/linguist/heuristics.rb', line 166

def match?(input)
  return !@pat.match?(input)
end