Class: Arrow::CSVReadOptions
- Inherits:
-
Object
- Object
- Arrow::CSVReadOptions
- Defined in:
- lib/arrow/csv-read-options.rb
Instance Method Summary collapse
- #add_column_type(name, type) ⇒ Object
- #add_column_type_raw ⇒ Object
- #delimiter ⇒ Object
- #delimiter=(delimiter) ⇒ Object
- #delimiter_raw ⇒ Object
- #delimiter_raw= ⇒ Object
Instance Method Details
#add_column_type(name, type) ⇒ Object
21 22 23 |
# File 'lib/arrow/csv-read-options.rb', line 21 def add_column_type(name, type) add_column_type_raw(name, DataType.resolve(type)) end |
#add_column_type_raw ⇒ Object
20 |
# File 'lib/arrow/csv-read-options.rb', line 20 alias_method :add_column_type_raw, :add_column_type |
#delimiter ⇒ Object
26 27 28 |
# File 'lib/arrow/csv-read-options.rb', line 26 def delimiter delimiter_raw.chr end |
#delimiter=(delimiter) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/arrow/csv-read-options.rb', line 31 def delimiter=(delimiter) case delimiter when String if delimiter.bytesize != 1 = "delimiter must be 1 byte character: #{delimiter.inspect}" raise ArgumentError, end delimiter = delimiter.ord end self.delimiter_raw = delimiter end |
#delimiter_raw ⇒ Object
25 |
# File 'lib/arrow/csv-read-options.rb', line 25 alias_method :delimiter_raw, :delimiter |
#delimiter_raw= ⇒ Object
30 |
# File 'lib/arrow/csv-read-options.rb', line 30 alias_method :delimiter_raw=, :delimiter= |