Module: DataTaster
- Defined in:
- lib/data_taster.rb,
lib/data_taster/helper.rb,
lib/data_taster/flavors.rb,
lib/data_taster/version.rb,
lib/data_taster/detergent.rb,
lib/data_taster/sanitizer.rb,
lib/data_taster/collection.rb,
lib/data_taster/confection.rb,
lib/data_taster/sql_literal.rb,
lib/data_taster/export_context.rb,
lib/data_taster/adapters/output.rb,
lib/data_taster/sanitizer_exporter.rb,
lib/data_taster/adapters/file_output.rb,
lib/data_taster/adapters/mysql_source.rb,
lib/data_taster/adapters/database_output.rb,
sig/data_taster.rbs
Defined Under Namespace
Modules: Helper, SqlLiteral
Classes: Collection, Confection, Config, DatabaseOutput, Detergent, ExportContext, FileOutput, Flavors, MysqlSource, Output, Sanitizer, SanitizerExporter
Constant Summary
collapse
- SKIP_CODE =
"skip_processing"
- VERSION =
"0.5.1"
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
Returns the value of attribute config.
22
23
24
|
# File 'lib/data_taster.rb', line 22
def config
@config
end
|
Class Method Details
.confection ⇒ Hash[String, untyped]
.default_list ⇒ Object
57
58
59
60
61
62
63
|
# File 'lib/data_taster.rb', line 57
def self.default_list
if defined?(Rails) && Rails.respond_to?(:root)
Rails.root.glob("**/data_taster_export_tables.yml")
else
[]
end
end
|
.logger ⇒ ::Logger
29
30
31
|
# File 'lib/data_taster.rb', line 29
def self.logger
@logger ||= Logger.new($stdout)
end
|
.logger=(logger) ⇒ void
This method returns an undefined value.
25
26
27
|
# File 'lib/data_taster.rb', line 25
def self.logger=(logger)
@logger = logger
end
|
.reset! ⇒ void
This method returns an undefined value.
33
34
35
36
37
|
# File 'lib/data_taster.rb', line 33
def self.reset!
self.config = nil
@confection = nil
end
|
.sample! ⇒ void
This method returns an undefined value.
53
54
55
|
# File 'lib/data_taster.rb', line 53
def self.sample!
config.output.sample!
end
|
.setup(source:, output:, months: nil, list: nil) ⇒ void
This method returns an undefined value.
39
40
41
42
43
44
45
46
47
|
# File 'lib/data_taster.rb', line 39
def self.setup(source:, output:, months: nil, list: nil)
@confection = nil
self.config = Config.new(
source,
output,
months,
Array.wrap(list || default_list)
)
end
|