Class: SimpleCov::Formatter::MultiFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/simplecov/formatter/multi_formatter.rb

Defined Under Namespace

Modules: InstanceMethods

Class Method Summary collapse

Class Method Details

.[](*args) ⇒ Object



26
27
28
29
# File 'lib/simplecov/formatter/multi_formatter.rb', line 26

def self.[](*args)
  warn "#{Kernel.caller.first}: [DEPRECATION] ::[] is deprecated. Use ::new instead."
  new(Array(args))
end

.new(formatters = nil) ⇒ Object



17
18
19
20
21
22
23
24
# File 'lib/simplecov/formatter/multi_formatter.rb', line 17

def self.new(formatters = nil)
  Class.new do
    define_method :formatters do
      @formatters ||= Array(formatters)
    end
    include InstanceMethods
  end
end