31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# File 'lib/t/stream.rb', line 31
def all
streaming_client.before_request do
if options["csv"]
require "csv"
say .to_csv
elsif options["long"] && STDOUT.tty?
headings = Array.new(.size) do |index|
[index] % [index]
end
print_table([headings])
end
end
streaming_client.sample do ||
next unless .is_a?(::)
if options["csv"]
()
elsif options["long"]
array = ().each_with_index.collect do |element, index|
[index] % element
end
print_table([array], truncate: STDOUT.tty?)
else
print_message(.user.screen_name, .text)
end
end
end
|