Class: Aef::Linebreak::CLI::VersionCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/aef/linebreak/cli/commands/version.rb

Overview

Command-line sub-command to display version and license info.

Instance Method Summary collapse

Instance Method Details

#executeObject

Main program



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/aef/linebreak/cli/commands/version.rb', line 28

def execute
  # Read licensing information from the top of this file
  license = File.read(__FILE__)[/=begin\n(.*)\n=end/m, 1]
      
  puts <<-TEXT
Linebreak::CLI #{Aef::Linebreak::CLI::VERSION}
using Linebreak #{Aef::Linebreak::VERSION}

Project: https://github.com/aef/linebreak-cli/
Documentation: http://rdoc.info/github/aef/linebreak-cli/

#{license}
  TEXT
      
  exit false
end