Class: RegularExpressionExcludeFilter

Inherits:
Filter
  • Object
show all
Defined in:
lib/notroff/filter.rb

Instance Method Summary collapse

Methods inherited from Filter

#process

Constructor Details

#initialize(exclude_re) ⇒ RegularExpressionExcludeFilter

Returns a new instance of RegularExpressionExcludeFilter.



18
19
20
# File 'lib/notroff/filter.rb', line 18

def initialize(exclude_re)
  @exclude_re = exclude_re
end

Instance Method Details

#included?(paragraph) ⇒ Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/notroff/filter.rb', line 22

def included?(paragraph)
  @exclude_re !~ paragraph    
end