Class: TAU::CLI

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

Class Method Summary collapse

Class Method Details

.intercept(options = {}) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/cli.rb', line 5

def self.intercept options={}
  if ARGV.include? '--help'
    if options.has_key? :help
      puts options[:help]
      exit 0
    end

    puts "This script is part of a set of utilities for text analysis. For more information, see https://github.com/matstc/text-analysis-utils"
    exit 0
  end

  if ARGV.include? '--version' or ARGV.include? '-v'
    puts "text-analysis-utils v#{TAU::VERSION}"
    exit 0
  end
end