Class: Tinge::Formatters::Formatter

Inherits:
Object
  • Object
show all
Defined in:
lib/tinge/formatters/formatter.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reporter, filename = nil) ⇒ Formatter

Returns a new instance of Formatter.



28
29
30
31
32
# File 'lib/tinge/formatters/formatter.rb', line 28

def initialize(reporter, filename = nil)
  require_dependencies
  @reporter = reporter
  @filename = filename
end

Class Method Details

.dependenciesObject



16
17
18
# File 'lib/tinge/formatters/formatter.rb', line 16

def self.dependencies
  @dependencies ||= {}
end

.dependency(name, filename = name) ⇒ Object



12
13
14
# File 'lib/tinge/formatters/formatter.rb', line 12

def self.dependency(name, filename = name)
  dependencies[name] = filename
end

.handles(*formats) ⇒ Object



6
7
8
9
10
# File 'lib/tinge/formatters/formatter.rb', line 6

def self.handles(*formats)
  formats.each do |format|
    Formatters.add(format, self)
  end
end

.require_filename?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/tinge/formatters/formatter.rb', line 24

def self.require_filename?
  false
end

.stringify_colors?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/tinge/formatters/formatter.rb', line 20

def self.stringify_colors?
  true
end