Class: Writexlsx::Package::Table::ColumnData

Inherits:
Object
  • Object
show all
Defined in:
lib/write_xlsx/package/table.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, param = {}) ⇒ ColumnData

Returns a new instance of ColumnData.



17
18
19
20
21
22
23
24
25
26
27
# File 'lib/write_xlsx/package/table.rb', line 17

def initialize(id, param = {})
  @id             = id
  @name           = "Column#{id}"
  @total_string   = ''
  @total_function = ''
  @custom_total   = ''
  @formula        = ''
  @format         = nil
  @name_format    = nil
  @user_data      = param[id - 1] if param
end

Instance Attribute Details

#custom_totalObject

Returns the value of attribute custom_total.



15
16
17
# File 'lib/write_xlsx/package/table.rb', line 15

def custom_total
  @custom_total
end

#formatObject

Returns the value of attribute format.



14
15
16
# File 'lib/write_xlsx/package/table.rb', line 14

def format
  @format
end

#formulaObject

Returns the value of attribute formula.



14
15
16
# File 'lib/write_xlsx/package/table.rb', line 14

def formula
  @formula
end

#idObject (readonly)

Returns the value of attribute id.



13
14
15
# File 'lib/write_xlsx/package/table.rb', line 13

def id
  @id
end

#nameObject

Returns the value of attribute name.



14
15
16
# File 'lib/write_xlsx/package/table.rb', line 14

def name
  @name
end

#name_formatObject

Returns the value of attribute name_format.



14
15
16
# File 'lib/write_xlsx/package/table.rb', line 14

def name_format
  @name_format
end

#total_functionObject

Returns the value of attribute total_function.



15
16
17
# File 'lib/write_xlsx/package/table.rb', line 15

def total_function
  @total_function
end

#total_stringObject

Returns the value of attribute total_string.



15
16
17
# File 'lib/write_xlsx/package/table.rb', line 15

def total_string
  @total_string
end