lib/signore/database.rb in signore-0.2.0 vs lib/signore/database.rb in signore-0.2.1
- old
+ new
@@ -8,10 +8,10 @@
store['signatures'] ||= []
store['signatures'] << sig
end
end
- def find(forbidden_tags: [], random: Random.new, required_tags: [])
+ def find forbidden_tags: [], random: Random.new, required_tags: []
store.transaction true do
store['signatures']
.select { |sig| required_tags.all? { |tag| sig.tagged_with? tag } }
.reject { |sig| forbidden_tags.any? { |tag| sig.tagged_with? tag } }
.sample random: random