A record filter that checks record IDs.
This is a boolean processor, so it merely returns true or false based on the filter result. Use this in conjunction with an If processor to actually perform other actions based on the result.
Create a new filter that checks against the given record ID. The given ID may be a string or a Regexp, in which case the filter will check for equality or regular expression match, respectively.
# File lib/sawmill/record_processor/filter_by_record_id.rb, line 55 def initialize(id_) @record_id = id_ end
# File lib/sawmill/record_processor/filter_by_record_id.rb, line 64 def extra_entry(entry_) id_ = entry_.respond_to?(:record_id) ? entry_.record_id : nil @record_id === id_ end
# File lib/sawmill/record_processor/filter_by_record_id.rb, line 69 def finish nil end
# File lib/sawmill/record_processor/filter_by_record_id.rb, line 60 def record(record_) @record_id === record_.record_id end