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.



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

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



16
17
18
19
20
21
# File 'lib/dawn/reporter.rb', line 16

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