Do not print a string that has no tag.

This matches the README description. We really want to encourage users
to use tags. Otherwise it becomes easy to accidentally have a string go
to too many destination files.
This commit is contained in:
Sebastian Celis 2012-02-10 18:50:31 -06:00
parent b5ab3249a9
commit 2daebb750e

View file

@ -23,12 +23,13 @@ module Twine
end
def matches_tags?(tags)
# The user did not specify any tags. Everything passes.
if tags == nil || tags.length == 0
if @tags == nil || @tags.length == 0
# This row has no tags. Never match
return false
elsif tags == nil || tags.length == 0
# The user did not specify any tags. Everything passes.
return true
end
if tags != nil && @tags != nil
else
tags.each do |tag|
if @tags.include? tag
return true