Sha256: b0101e9e85babbde77779630bea3ab9af94cab80c880599b134446bf09c15bae

Contents?: true

Size: 1.23 KB

Versions: 7

Compression:

Stored size: 1.23 KB

Contents

=begin
    Copyright 2010-2014 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

module Arachni

# The namespace under which all reporters exist.
module Reporters
end

module Reporter

# Holds and manages {Reporters}.
#
# @author Tasos "Zapotek" Laskos <tasos.laskos@arachni-scanner.com>
class Manager < Arachni::Component::Manager
    NAMESPACE = Arachni::Reporters

    def initialize
        super( Arachni::Options.paths.reporters, NAMESPACE )
    end

    # @param  [Symbol, String]  name
    # @param  [Report]          report
    # @param  [Hash]            options
    #
    # @see Report
    def run( name, report, options = {} )
        exception_jail false do
            self[name].new( report, prepare_options( name, self[name], options ) ).tap(&:run)
        end
    end

    def self.reset
        remove_constants( NAMESPACE )
    end
    def reset
        self.class.reset
    end

    private

    def paths
        Dir.glob( File.join( "#{@lib}", '*.rb' ) ).reject { |path| helper?( path ) }
    end

end

end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
arachni-1.0.6 lib/arachni/reporter/manager.rb
arachni-1.0.5 lib/arachni/reporter/manager.rb
arachni-1.0.4 lib/arachni/reporter/manager.rb
arachni-1.0.3 lib/arachni/reporter/manager.rb
arachni-1.0.2 lib/arachni/reporter/manager.rb
arachni-1.0.1 lib/arachni/reporter/manager.rb
arachni-1.0 lib/arachni/reporter/manager.rb