class Osheet::Worksheet
Attributes
columns[R]
rows[R]
Public Class Methods
new(name=nil, *args)
click to toggle source
# File lib/osheet/worksheet.rb, line 16 def initialize(name=nil, *args) @name = name @columns = [] @rows = [] end
Public Instance Methods
column(column_obj)
click to toggle source
# File lib/osheet/worksheet.rb, line 26 def column(column_obj) @columns << column_obj end
name(value=nil)
click to toggle source
# File lib/osheet/worksheet.rb, line 22 def name(value=nil) value.nil? ? @name : @name = value.to_s end
row(row_obj)
click to toggle source
Osheet
only stores the latest row in memory for reference memory bloat would be unmanageable in large spreadsheets if all rows were stored
# File lib/osheet/worksheet.rb, line 33 def row(row_obj) @rows.pop @rows << row_obj end