Class: Scio::Excel::Column
- Inherits:
-
Object
- Object
- Scio::Excel::Column
- 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
-
#cell_style ⇒ Object
Returns the value of attribute cell_style.
-
#header_style ⇒ Object
Returns the value of attribute header_style.
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(name, opts = {}) ⇒ Column
constructor
A new instance of Column.
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_style ⇒ Object
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_style ⇒ Object
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 |
#name ⇒ Object
Returns the value of attribute name.
391 392 393 |
# File 'lib/dm_core/scio_excel.rb', line 391 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
391 392 393 |
# File 'lib/dm_core/scio_excel.rb', line 391 def type @type end |
#width ⇒ Object
Returns the value of attribute width.
391 392 393 |
# File 'lib/dm_core/scio_excel.rb', line 391 def width @width end |