Class: Flume::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/flume/cli.rb

Instance Method Summary collapse

Instance Method Details

#tail(list) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/flume/cli.rb', line 7

def tail(list)
  logger = Flume.logger :list => list
  puts logger.tail(options[:number])

  if options[:f]
    trap(:INT) { puts; exit }
    logger.tailf do |line|
      puts line
    end
  end
end

#versionObject



20
21
22
# File 'lib/flume/cli.rb', line 20

def version
  puts "Flume #{Flume::VERSION}"
end