lib/miam/client.rb in miam-0.2.4.beta10 vs lib/miam/client.rb in miam-0.2.4.beta11
- old
+ new
@@ -506,14 +506,20 @@
raise TypeError, "can't convert #{file} into File"
end
end
def target_matched?(name)
+ result = true
+
+ if @options[:exclude]
+ result &&= name !~ @options[:exclude]
+ end
+
if @options[:target]
- name =~ @options[:target]
- else
- true
+ result &&= name =~ @options[:target]
end
+
+ result
end
def exec_by_format(proc_by_format)
format_proc = proc_by_format[@options[:format]]
raise "Invalid format: #{@options[:format]}" unless format_proc