lib/arachni/report.rb in arachni-1.0.6 vs lib/arachni/report.rb in arachni-1.1

- old
+ new

@@ -1,7 +1,7 @@ =begin - Copyright 2010-2014 Tasos Laskos <tasos.laskos@arachni-scanner.com> + Copyright 2010-2015 Tasos Laskos <tasos.laskos@arachni-scanner.com> This file is part of the Arachni Framework project and is subject to redistribution and commercial restrictions. Please see the Arachni Framework web site for more information on licensing and terms of use. =end @@ -83,11 +83,21 @@ @issues[issue.digest] = issue end self.issues end + # @param [String] check + # Check shortname. + # # @return [Array<Issue>] + def issues_by_check( check ) + @issues.map do |_, issue| + issue if issue.check[:shortname] == check.to_s + end.compact + end + + # @return [Array<Issue>] # Logged issues. def issues @issues.values end @@ -148,10 +158,10 @@ File.expand_path( location ) end # @return [String] - # Report serialized in the Arachni Framework Report format.. + # Report serialized in the Arachni Framework Report format. def to_afr afr = RPC::Serializer.dump( self ) # Append metadata to the end of the dump. metadata = RPC::Serializer.dump( summary )