Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
toy committed Nov 10, 2024
1 parent 8a7086b commit 5df97d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/dump/snapshot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ def self.list(options = {})
dumps = dumps.select{ |dump| dump.name[options[:like]] } if options[:like]
if options[:tags]
tags = get_filter_tags(options[:tags])
dumps = dumps.select{ |dump| (dump.tags & tags[:simple]).present? } if tags[:simple].present?
dumps = dumps.select{ |dump| (dump.tags & tags[:mandatory]) == tags[:mandatory] } if tags[:mandatory].present?
dumps = dumps.reject{ |dump| (dump.tags & tags[:forbidden]).present? } if tags[:forbidden].present?
# dumps = dumps.select{ |dump| dump.tags.intersect?(tags[:simple]) } if tags[:simple].present?
# dumps = dumps.select{ |dump| dump.tags.superset?(tags[:mandatory]) } if tags[:mandatory].present?
# dumps = dumps.reject{ |dump| dump.tags.intersect?(tags[:forbidden]) } if tags[:forbidden].present?
end
dumps
end
Expand Down

0 comments on commit 5df97d9

Please sign in to comment.