Class: Scio::Excel::Column

Inherits:
Object
  • Object
show all
Defined in:
lib/dm_core/scio_excel.rb

Overview

Defines a Column for the data. You can set different styles for the header and the cells.

You can also set the width of the column.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, opts = {}) ⇒ Column

Returns a new instance of Column.



396
397
398
399
400
401
402
# File 'lib/dm_core/scio_excel.rb', line 396

def initialize(name, opts = {})
  @name = name
  @header_style = opts[:header_style]
  @cell_style = opts[:cell_style]
  @width = opts[:width]
  @type = opts[:type].nil? ? 'String' : opts[:type]
end

Instance Attribute Details

#cell_styleObject

Returns the value of attribute cell_style.



391
392
393
# File 'lib/dm_core/scio_excel.rb', line 391

def cell_style
  @cell_style
end

#header_styleObject

Returns the value of attribute header_style.



391
392
393
# File 'lib/dm_core/scio_excel.rb', line 391

def header_style
  @header_style
end

#nameObject

Returns the value of attribute name.



391
392
393
# File 'lib/dm_core/scio_excel.rb', line 391

def name
  @name
end

#typeObject

Returns the value of attribute type.



391
392
393
# File 'lib/dm_core/scio_excel.rb', line 391

def type
  @type
end

#widthObject

Returns the value of attribute width.



391
392
393
# File 'lib/dm_core/scio_excel.rb', line 391

def width
  @width
end