Class: Gm::Notepad::TableColumnSet

Inherits:
Object
  • Object
show all
Extended by:
Dry::Initializer
Defined in:
lib/gm/notepad/table_column_set.rb

Defined Under Namespace

Classes: Null

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ TableColumnSet

Returns a new instance of TableColumnSet.



24
25
26
27
# File 'lib/gm/notepad/table_column_set.rb', line 24

def initialize(*args)
  super
  process_line!
end

Instance Method Details

#column_index_for(cell:) ⇒ Object



33
34
35
# File 'lib/gm/notepad/table_column_set.rb', line 33

def column_index_for(cell:)
  @column_registry.index(cell.downcase)
end

#namesObject



29
30
31
# File 'lib/gm/notepad/table_column_set.rb', line 29

def names
  @column_registry.map(&:to_s)
end