Class: Dobby::Formatter::AbstractFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/dobby/formatter/abstract_formatter.rb

Direct Known Subclasses

JSONFormatter, SimpleFormatter

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(output, options = {}) ⇒ AbstractFormatter

Returns a new instance of AbstractFormatter.



9
10
11
12
# File 'lib/dobby/formatter/abstract_formatter.rb', line 9

def initialize(output, options = {})
  @output = output
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/dobby/formatter/abstract_formatter.rb', line 7

def options
  @options
end

#outputObject (readonly)

Returns the value of attribute output.



6
7
8
# File 'lib/dobby/formatter/abstract_formatter.rb', line 6

def output
  @output
end

Instance Method Details

#file_finished(file, results) ⇒ Object



20
# File 'lib/dobby/formatter/abstract_formatter.rb', line 20

def file_finished(file, results); end

#file_started(file) ⇒ Object

Called when starting work for a single file.



18
# File 'lib/dobby/formatter/abstract_formatter.rb', line 18

def file_started(file); end

#finished(files) ⇒ Object



22
# File 'lib/dobby/formatter/abstract_formatter.rb', line 22

def finished(files); end

#started(target_files) ⇒ Object

Called once before starting work.



15
# File 'lib/dobby/formatter/abstract_formatter.rb', line 15

def started(target_files); end