Class: CSV2Avro
- Inherits:
-
Object
- Object
- CSV2Avro
- Defined in:
- lib/csv2avro.rb,
lib/csv2avro/schema.rb,
lib/csv2avro/version.rb,
lib/csv2avro/converter.rb,
lib/csv2avro/avro_writer.rb
Defined Under Namespace
Classes: AvroWriter, Converter, Schema
Constant Summary collapse
- VERSION =
"1.0.1"
Instance Attribute Summary collapse
-
#bad_rows_path ⇒ Object
readonly
Returns the value of attribute bad_rows_path.
-
#input_path ⇒ Object
readonly
Returns the value of attribute input_path.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#schema_path ⇒ Object
readonly
Returns the value of attribute schema_path.
-
#stdout_option ⇒ Object
readonly
Returns the value of attribute stdout_option.
Instance Method Summary collapse
- #convert ⇒ Object
-
#initialize(options) ⇒ CSV2Avro
constructor
A new instance of CSV2Avro.
Constructor Details
#initialize(options) ⇒ CSV2Avro
Returns a new instance of CSV2Avro.
7 8 9 10 11 12 13 14 |
# File 'lib/csv2avro.rb', line 7 def initialize() @input_path = ARGV.first @schema_path = .delete(:schema) @bad_rows_path = .delete(:bad_rows) @stdout_option = !input_path || .delete(:stdout) @options = end |
Instance Attribute Details
#bad_rows_path ⇒ Object (readonly)
Returns the value of attribute bad_rows_path.
5 6 7 |
# File 'lib/csv2avro.rb', line 5 def bad_rows_path @bad_rows_path end |
#input_path ⇒ Object (readonly)
Returns the value of attribute input_path.
5 6 7 |
# File 'lib/csv2avro.rb', line 5 def input_path @input_path end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/csv2avro.rb', line 5 def @options end |
#schema_path ⇒ Object (readonly)
Returns the value of attribute schema_path.
5 6 7 |
# File 'lib/csv2avro.rb', line 5 def schema_path @schema_path end |
#stdout_option ⇒ Object (readonly)
Returns the value of attribute stdout_option.
5 6 7 |
# File 'lib/csv2avro.rb', line 5 def stdout_option @stdout_option end |