Module: Simnos::Filterable
- Included in:
- Client, ClientWrapper
- Defined in:
- lib/simnos/filterable.rb
Instance Method Summary collapse
Instance Method Details
#target?(topic_name) ⇒ Boolean
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/simnos/filterable.rb', line 3 def target?(topic_name) unless [:includes].empty? unless [:includes].include?(topic_name) Simnos.logger.debug("skip topic(with include-names option) #{topic_name}") return false end end unless [:excludes].empty? if [:excludes].any? { |regex| topic_name =~ regex } Simnos.logger.debug("skip topic(with exclude-names option) #{topic_name}") return false end end true end |