Class: Tempo::Views::Formatters::Interactive
- Inherits:
-
Base
- Object
- Base
- Tempo::Views::Formatters::Interactive
show all
- Defined in:
- lib/tempo/views/formatters/interactive.rb
Instance Method Summary
collapse
Methods inherited from Base
#format_records, #initialize, #report
Instance Method Details
35
36
37
38
39
40
|
# File 'lib/tempo/views/formatters/interactive.rb', line 35
def format_records_container(container)
end
|
#message_block(record) ⇒ Object
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# 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) ⇒ Object
28
29
30
31
32
33
|
# 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
|