Class: Watobo::Interceptor::FlagFilter

Inherits:
Filter
  • Object
show all
Defined in:
lib/watobo/core/intercept_filter.rb

Instance Attribute Summary

Attributes inherited from Filter

#flags, #match_type, #pattern

Instance Method Summary collapse

Methods inherited from Filter

#initialize, #match?, #name, #negate=, #negated?

Constructor Details

This class inherits a constructor from Watobo::Interceptor::Filter

Instance Method Details

#check?(item, flags = nil) ⇒ Boolean

Returns:

  • (Boolean)

56
57
58
59
60
61
# File 'lib/watobo/core/intercept_filter.rb', line 56

def check?(item, flags=nil)
  @flags.each do |f|
    return false unless flags.include? f
  end
  return true
end