Class: Dawn::Reporter

Inherits:
Object
  • Object
show all
Defined in:
lib/dawn/reporter.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Reporter

Returns a new instance of Reporter.



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/dawn/reporter.rb', line 6

def initialize(options={})
  @engine = nil
  @ret = false

  @filename = options[:filename]
  @ret = options[:apply_all_code] unless options[:apply_all_code].nil?
  @format = options[:format] unless options[:format].nil?
  @engine = options[:engine] unless options[:engine].nil?

  @format = :tabular unless is_valid_format?(@format)
end

Instance Method Details

#reportObject



18
19
20
21
22
23
# File 'lib/dawn/reporter.rb', line 18

def report
  ascii_tabular_report  if @format == :tabular
  json_report           if @format == :json
  ascii_plain_report    if @format == :console
  html_report           if @format == :html
end