Class: Attest::OutputWriterConfigurator

Inherits:
Object
  • Object
show all
Defined in:
lib/attest/interface/output_writer_configurator.rb

Class Method Summary collapse

Class Method Details

.configure(output_writer_identifier) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/attest/interface/output_writer_configurator.rb', line 8

def configure(output_writer_identifier)
  output_writer_identifier = output_writer_identifier || default_output_writer_identifier
  raise "You have specified an unknown output writer" unless output_writer_identifiers.include? output_writer_identifier
  output_writer_class = "#{output_writer_identifier}OutputWriter"
  #Attest.config.output_writer = Attest::Output.const_get(output_writer_class).new
  Attest::Output.const_get(output_writer_class).new
end

.default_output_writer_identifierObject



16
17
18
# File 'lib/attest/interface/output_writer_configurator.rb', line 16

def default_output_writer_identifier
  "Basic"
end

.output_writer_identifiersObject



20
21
22
# File 'lib/attest/interface/output_writer_configurator.rb', line 20

def output_writer_identifiers
  [default_output_writer_identifier, "TestUnit", "FailuresOnly"]
end