module CwlogTail

Constants

VERSION

Public Class Methods

follow?() click to toggle source
# File lib/cwlog_tail.rb, line 6
def self.follow?
  ARGV.member?('-f')
end
lines() click to toggle source
# File lib/cwlog_tail.rb, line 10
def self.lines
  idx = ARGV.index('-n') || ARGV.index('--lines')
  if idx.nil?
    nil
  else
    ARGV[idx + 1].to_i
  end
end
options() click to toggle source
# File lib/cwlog_tail.rb, line 19
def self.options
  { follow: follow?,
    lines: lines,
  }
end