Class: Sheetah::Column

Inherits:
Object
  • Object
show all
Defined in:
lib/sheetah/column.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key:, type:, index:, header:, header_pattern:, required:) ⇒ Column

Returns a new instance of Column.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/sheetah/column.rb', line 5

def initialize(
  key:,
  type:,
  index:,
  header:,
  header_pattern:,
  required:
)
  @key            = key
  @type           = type
  @index          = index
  @header         = header
  @header_pattern = header_pattern
  @required       = required
end

Instance Attribute Details

#headerObject (readonly)

Returns the value of attribute header.



21
22
23
# File 'lib/sheetah/column.rb', line 21

def header
  @header
end

#header_patternObject (readonly)

Returns the value of attribute header_pattern.



21
22
23
# File 'lib/sheetah/column.rb', line 21

def header_pattern
  @header_pattern
end

#indexObject (readonly)

Returns the value of attribute index.



21
22
23
# File 'lib/sheetah/column.rb', line 21

def index
  @index
end

#keyObject (readonly)

Returns the value of attribute key.



21
22
23
# File 'lib/sheetah/column.rb', line 21

def key
  @key
end

#typeObject (readonly)

Returns the value of attribute type.



21
22
23
# File 'lib/sheetah/column.rb', line 21

def type
  @type
end

Instance Method Details

#required?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/sheetah/column.rb', line 27

def required?
  @required
end