lib/gm/notepad/table.rb in gm-notepad-0.0.11 vs lib/gm/notepad/table.rb in gm-notepad-0.0.12

- old
+ new

@@ -13,10 +13,11 @@ option :lines, type: method(:Array) option :index_entry_prefix_regexp, default: -> { Container.resolve(:config).index_entry_prefix_regexp } def initialize(*args) super + @table = {} set_null_table_column_set! process(lines: lines) end def lookup(index: false, cell: false) @@ -87,10 +88,9 @@ rand(@table.size) end STARTS_WITH_COMMENT_REGEXP = %r{\A#} def process(lines:) - @table = {} lines.each do |line| line = line.strip # Handle Comment case line when STARTS_WITH_COMMENT_REGEXP