spec/lib/matchers.rb in wvanbergen-request-log-analyzer-1.2.7 vs spec/lib/matchers.rb in wvanbergen-request-log-analyzer-1.2.8
- old
+ new
@@ -11,12 +11,12 @@
@captures += captures
return self
end
def matches?(file_format)
- if file_format.new.line_definitions.include?(@line_type)
- ld = file_format.new.line_definitions[@line_type]
- @captures.all? { |c| ld.captures.include?(c) }
+ file_format = file_format.create if file_format.kind_of?(Class)
+ if ld = file_format.line_definitions[@line_type]
+ @captures.all? { |c| ld.captures.map { |cd| cd[:name] }.include?(c) }
else
false
end
end
end
\ No newline at end of file