Method: Flydata::Command::Base#ask_input_table_name

Defined in:
lib/flydata/command/base.rb

#ask_input_table_nameObject



154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'lib/flydata/command/base.rb', line 154

def ask_input_table_name
  input = nil
  loop do
    log_info_stdout("Input a table name.")
    say(">> ")
    input = gets.strip
    if input =~ /^[a-zA-Z0-9_]+$/
      break
    else
      puts "Please enter a valid table name."
    end
  end
  log_info(">> #{input}")
  input
end