Class: Wice::Spreadsheet
Overview
:nodoc:
Instance Attribute Summary collapse
-
#tempfile ⇒ Object
readonly
:nodoc:.
Instance Method Summary collapse
-
#<<(row) ⇒ Object
:nodoc:.
-
#initialize(name, field_separator, encoding = nil) ⇒ Spreadsheet
constructor
:nodoc:.
Constructor Details
#initialize(name, field_separator, encoding = nil) ⇒ Spreadsheet
:nodoc:
9 10 11 12 13 |
# File 'lib/wice/wice_grid_spreadsheet.rb', line 9 def initialize(name, field_separator, encoding = nil) #:nodoc: @tempfile = Tempfile.new(name) @tempfile.set_encoding(encoding) unless encoding.blank? @csv = CSV.new(@tempfile, col_sep: field_separator) end |
Instance Attribute Details
#tempfile ⇒ Object (readonly)
:nodoc:
7 8 9 |
# File 'lib/wice/wice_grid_spreadsheet.rb', line 7 def tempfile @tempfile end |
Instance Method Details
#<<(row) ⇒ Object
:nodoc:
15 16 17 |
# File 'lib/wice/wice_grid_spreadsheet.rb', line 15 def << (row) #:nodoc: @csv << row end |