Class: SimpleCSV::String
Instance Attribute Summary
Attributes inherited from SimpleCSV
#as_array, #header_row, #mode, #quote, #row_separator, #rows, #selected_columns
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(string, *args) ⇒ String
constructor
class << self.
- #source ⇒ Object
Methods inherited from SimpleCSV
#attributes, attributes, #attributes=, #close, collect, #columns, columns, #columns=, detect, each, #each, #first_row, first_row, foreach, header_row, #header_row?, parse, #parse, parse_csv, parse_line, #parse_row, read, #read, read_csv, #read_header, reject, select, source_type, #to_a, write, #write, write_csv, #write_header, #write_row
Constructor Details
#initialize(string, *args) ⇒ String
class << self
20 21 22 23 |
# File 'lib/SimpleCSV/String.rb', line 20 def initialize(string, *args) @string = string super(source, *args) end |
Class Method Details
.open(source, *args, &block) ⇒ Object
13 14 15 16 |
# File 'lib/SimpleCSV/String.rb', line 13 def open(source, *args, &block) @csv_file = new(source, *args) super(source, *args, &block) end |
Instance Method Details
#source ⇒ Object
25 26 27 |
# File 'lib/SimpleCSV/String.rb', line 25 def source @source ||= StringIO.new(@string) end |