Class: Portable::Modeling::DataTable

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#autoObject (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

#columnsObject (readonly)

Returns the value of attribute columns.



19
20
21
# File 'lib/portable/modeling/data_table.rb', line 19

def columns
  @columns
end

#include_headersObject (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