module Tapout::Reporters
Namespace for Report Formats.
Constants
- DEAFULT_REPORTER
Default reporter.
Public Class Methods
factory(name)
click to toggle source
Returns a reporter class given it's name or a unique abbreviation of it. If `name` is `nil` then the default dot reporter is returned.
# File lib/tapout/reporters/abstract.rb, line 21 def self.factory(name) list = index.keys.abbrev rptr = index[list[name || DEAFULT_REPORTER]] unless rptr begin require "tapout-#{name}" list = index.keys.abbrev rptr = index[list[name || DEAFULT_REPORTER]] rescue LoadError end raise ArgumentError, "Unrecognized reporter -- #{name.inspect}" unless rptr end rptr end
index()
click to toggle source
Returns a Hash of name to reporter class.
# File lib/tapout/reporters/abstract.rb, line 15 def self.index @index ||= {} end