Class: CSVToSqlite::Runner
- Inherits:
-
Object
- Object
- CSVToSqlite::Runner
- Defined in:
- lib/csv_to_sqlite/runner.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#argv ⇒ Object
readonly
Returns the value of attribute argv.
-
#command ⇒ Object
readonly
Returns the value of attribute command.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#parser ⇒ Object
readonly
Returns the value of attribute parser.
Instance Method Summary collapse
-
#initialize(argv) ⇒ Runner
constructor
A new instance of Runner.
- #run ⇒ Object
Constructor Details
#initialize(argv) ⇒ Runner
Returns a new instance of Runner.
13 14 15 16 17 18 19 |
# File 'lib/csv_to_sqlite/runner.rb', line 13 def initialize(argv) @argv = argv @options = { :verbose => true } init_parser end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
11 12 13 |
# File 'lib/csv_to_sqlite/runner.rb', line 11 def arguments @arguments end |
#argv ⇒ Object (readonly)
Returns the value of attribute argv.
7 8 9 |
# File 'lib/csv_to_sqlite/runner.rb', line 7 def argv @argv end |
#command ⇒ Object (readonly)
Returns the value of attribute command.
10 11 12 |
# File 'lib/csv_to_sqlite/runner.rb', line 10 def command @command end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/csv_to_sqlite/runner.rb', line 9 def @options end |
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
8 9 10 |
# File 'lib/csv_to_sqlite/runner.rb', line 8 def parser @parser end |
Instance Method Details
#run ⇒ Object
21 22 23 24 |
# File 'lib/csv_to_sqlite/runner.rb', line 21 def run parse! CSVToSqlite::Parser.new(@source, @target, @options[:table], @options[:columns]).parse! end |