Method: TableSetting::Sheet#initialize

Defined in:
lib/table_setting/sheet.rb

#initialize(parent_stack = TableSetting::Stack.new, options = {}) ⇒ Sheet

Returns a new instance of Sheet.



7
8
9
10
11
12
13
14
# File 'lib/table_setting/sheet.rb', line 7

def initialize(parent_stack = TableSetting::Stack.new, options = {})
  @stack = parent_stack
  @stack.sheets.push(self)
  @rows = []

  @@counter += 1
  @name = options[:name] || "Sheet#{@@counter}"
end