Method: Maatkit::VariableAdvisor#start
- Defined in:
- lib/maatkit-ruby/mk-variable-advisor.rb
#start(options = nil) ⇒ Object
Execute the command
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/maatkit-ruby/mk-variable-advisor.rb', line 48 def start( = nil) tmp = Tempfile.new('tmp') command = option_string() + .to_s + " 2> " + tmp.path success = system(command) if success begin while (line = tmp.readline) line.chomp selected_string = line end rescue EOFError tmp.close end return selected_string else tmp.close! return success end end |