Class: ArrayTransform::Operations::RemoveColumn

Inherits:
Object
  • Object
show all
Includes:
Callable
Defined in:
lib/array_transform/operations/remove_column.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Callable

included

Constructor Details

#initialize(column_header: nil, column_index: nil, data:) ⇒ RemoveColumn

Returns a new instance of RemoveColumn.



6
7
8
9
10
11
12
13
14
# File 'lib/array_transform/operations/remove_column.rb', line 6

def initialize(
  column_header: nil,
  column_index: nil,
  data:
)
  @column_header = column_header
  @column_index = column_index
  @data = data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



16
17
18
# File 'lib/array_transform/operations/remove_column.rb', line 16

def data
  @data
end

Instance Method Details

#callObject



18
19
20
21
# File 'lib/array_transform/operations/remove_column.rb', line 18

def call
  validate!
  remove_column
end