Module: FileSplit
- Defined in:
- lib/file_split.rb,
lib/file_split/version.rb,
lib/file_split/file_splitter.rb
Defined Under Namespace
Classes: FileSplitter
Constant Summary collapse
- VERSION =
"0.0.2"
Class Attribute Summary collapse
-
.config ⇒ Object
Returns the value of attribute config.
Class Method Summary collapse
-
.start(source, target, lines, maxlines, header, footer) ⇒ Object
FileSplitter Wrap.
Class Attribute Details
.config ⇒ Object
Returns the value of attribute config.
7 8 9 |
# File 'lib/file_split.rb', line 7 def config @config end |
Class Method Details
.start(source, target, lines, maxlines, header, footer) ⇒ Object
FileSplitter Wrap
Example:
>> FileSplit.start /path/out/large.sql, /path/in/small.sql, 1000, 0, 2, 2
=> void
Attributes:
source: (String)
target: (String)
lines: (Integer)
maxlines: (Integer)
header: (Integer)
footer: (Integer)
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/file_split.rb', line 24 def self.start(source, target, lines, maxlines, header, ) begin @config = { :source => source, :target => target, :lines => lines.to_i, :maxlines => maxlines.to_i, :header => header.to_i, :footer => .to_i } instance = FileSplitter.new instance.start rescue StandardError => e puts e. puts e.backtrace.join("\n") if e.backtrace end end |