class Tempo::Views::Formatters::Interactive
Public Instance Methods
format_records_container(container)
click to toggle source
# File lib/tempo/views/formatters/interactive.rb, line 35 def format_records_container(container) # Pass through over-ride # We don't allow interactive containers at this time because they # would need to be able to detect when the container is complete. # (report containers raised errors on nil durations). end
message_block(record)
click to toggle source
# File lib/tempo/views/formatters/interactive.rb, line 13 def message_block(record) record.format do |m| case m.category when :immediate puts "#{m.message}" when :progress puts "#{m.message}..." when :progress_partial $stdout.sync = true print "#{m.message}..." end m.message end end
query_block(query)
click to toggle source
# File lib/tempo/views/formatters/interactive.rb, line 28 def query_block(query) query.format do |q| puts q.query response = Readline.readline('> ', true) end end