Class: CsvWriter
- Inherits:
-
Object
- Object
- CsvWriter
- Defined in:
- lib/csv_writer.rb
Instance Method Summary collapse
-
#initialize(path, env) ⇒ CsvWriter
constructor
A new instance of CsvWriter.
-
#write(method, data) ⇒ Object
dispatches the configured CSV create style to the matching method.
Constructor Details
#initialize(path, env) ⇒ CsvWriter
Returns a new instance of CsvWriter.
4 5 6 |
# File 'lib/csv_writer.rb', line 4 def initialize(path, env) @file = qualified_csv_path(path, env) end |
Instance Method Details
#write(method, data) ⇒ Object
dispatches the configured CSV create style to the matching method
9 10 11 |
# File 'lib/csv_writer.rb', line 9 def write(method, data) self.send(method.to_sym, convert_to_hash_array(data)) end |