Class: RailsFinder::TableSelector

Inherits:
Object
  • Object
show all
Defined in:
lib/railsfinder/table_selector.rb

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ TableSelector

Returns a new instance of TableSelector.



8
9
10
11
12
13
# File 'lib/railsfinder/table_selector.rb', line 8

def initialize(data)
  @data = data
  @filtered_table_names = data.keys
  @selected_index = 0
  @input = ''
end

Instance Method Details

#startObject



15
16
17
18
19
20
21
# File 'lib/railsfinder/table_selector.rb', line 15

def start
  loop do
    read_user_input
    break if @exit_requested
    render_layout
  end
end