Module: Schlepp
- Defined in:
- lib/schlepp.rb,
lib/schlepp/env.rb,
lib/schlepp/sink.rb,
lib/schlepp/source.rb,
lib/schlepp/version.rb,
lib/schlepp/source/csv.rb,
lib/schlepp/sink/filter.rb,
lib/schlepp/sink/filter/chunker.rb,
lib/schlepp/sink/filter/compressor.rb,
lib/schlepp/sink/table_object/stream.rb,
lib/schlepp/sink/filter/formatter/csv.rb,
lib/schlepp/sink/table_object/carosel.rb,
lib/schlepp/sink/table_object/factory.rb,
lib/schlepp/sink/table_object/filters.rb,
lib/schlepp/sink/filter/compressor/stream.rb,
lib/schlepp/sink/filter/compressor/writer.rb,
lib/schlepp/sink/table_object/filter/writer.rb,
lib/schlepp/sink/filter/formatter/csv/writer.rb,
lib/schlepp/sink/table_object/writer/factory.rb,
lib/schlepp/sink/table_object/filter/observer.rb
Defined Under Namespace
Modules: Source
Classes: Sink
Constant Summary
collapse
- VERSION =
"0.1.0"
Class Method Summary
collapse
Class Method Details
.env ⇒ Object
19
20
21
|
# File 'lib/schlepp/env.rb', line 19
def env
@_env ||= ActiveSupport::StringInquirer.new(ENV["QUASAR_ENV"] || ENV["RAILS_ENV"] || "development")
end
|
.env=(environment) ⇒ Object
23
24
25
|
# File 'lib/schlepp/env.rb', line 23
def env=(environment)
@_env = ActiveSupport::StringInquirer.new(environment)
end
|
.logger ⇒ Object
5
6
7
8
9
10
11
12
13
|
# File 'lib/schlepp/env.rb', line 5
def logger
return @logger if @logger
@logger = Logger.new(STDOUT)
@logger.formatter = proc { |severity, datetime, progname, msg|
"[#{datetime}, #{severity}] #{msg}\n"
}
@logger
end
|
.logger=(logger) ⇒ Object
15
16
17
|
# File 'lib/schlepp/env.rb', line 15
def logger=(logger)
@logger = logger
end
|
.schlepp(source, sink) ⇒ Object
11
12
13
14
15
16
|
# File 'lib/schlepp.rb', line 11
def schlepp(source, sink)
source.each do |s|
sink.write(s)
end
sink.finalize
end
|