Class: DatabaseConsistency::Writers::BaseWriter

Inherits:
Object
  • Object
show all
Defined in:
lib/database_consistency/writers/base_writer.rb

Overview

The base class for writers

Direct Known Subclasses

AutofixWriter, SimpleWriter, TodoWriter

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(results, config: Configuration.new) ⇒ BaseWriter

Returns a new instance of BaseWriter.



9
10
11
12
# File 'lib/database_consistency/writers/base_writer.rb', line 9

def initialize(results, config: Configuration.new)
  @results = results
  @config = config
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



7
8
9
# File 'lib/database_consistency/writers/base_writer.rb', line 7

def config
  @config
end

#resultsObject (readonly)

Returns the value of attribute results.



7
8
9
# File 'lib/database_consistency/writers/base_writer.rb', line 7

def results
  @results
end

Class Method Details

.write(results, config: Configuration.new) ⇒ Object



14
15
16
# File 'lib/database_consistency/writers/base_writer.rb', line 14

def self.write(results, config: Configuration.new)
  new(results, config: config).write
end