Class: Text::Gen::Filter::Reject
- Defined in:
- lib/text/gen/filter/reject.rb
Overview
Reject reduces the items in the array to only those without the given metadata. This is the opposite of ‘select`.
Instance Method Summary collapse
Methods inherited from Base
#component_key, filter_key, filter_name, #initialize, #key, #to_s, #type, #value
Constructor Details
This class inherits a constructor from Text::Gen::Filter::Base
Instance Method Details
#items(_context, items) ⇒ Object
9 10 11 12 13 |
# File 'lib/text/gen/filter/reject.rb', line 9 def items(_context, items) items.select do |item| pass_reject?(item["meta"]) end end |