Class: Portable::Modeling::DataTable
- Inherits:
-
Object
- Object
- Portable::Modeling::DataTable
- Defined in:
- lib/portable/modeling/data_table.rb
Overview
Defines all the options for the data grid within an export like columns, whether or not you want to include headers, and more.
Instance Attribute Summary collapse
-
#auto ⇒ Object
(also: #auto?)
readonly
Returns the value of attribute auto.
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
-
#include_headers ⇒ Object
(also: #include_headers?)
readonly
Returns the value of attribute include_headers.
Instance Method Summary collapse
-
#initialize(auto: true, columns: [], include_headers: true) ⇒ DataTable
constructor
A new instance of DataTable.
Constructor Details
#initialize(auto: true, columns: [], include_headers: true) ⇒ DataTable
Returns a new instance of DataTable.
24 25 26 27 28 29 30 |
# File 'lib/portable/modeling/data_table.rb', line 24 def initialize(auto: true, columns: [], include_headers: true) @auto = auto || false @columns = Column.array(columns) @include_headers = include_headers || false freeze end |
Instance Attribute Details
#auto ⇒ Object (readonly) Also known as: auto?
Returns the value of attribute auto.
19 20 21 |
# File 'lib/portable/modeling/data_table.rb', line 19 def auto @auto end |
#columns ⇒ Object (readonly)
Returns the value of attribute columns.
19 20 21 |
# File 'lib/portable/modeling/data_table.rb', line 19 def columns @columns end |
#include_headers ⇒ Object (readonly) Also known as: include_headers?
Returns the value of attribute include_headers.
19 20 21 |
# File 'lib/portable/modeling/data_table.rb', line 19 def include_headers @include_headers end |