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 "Linebreak::CLI \#{Aef::Linebreak::CLI::VERSION}\nusing Linebreak \#{Aef::Linebreak::VERSION}\n\nProject: https://github.com/aef/linebreak-cli/\nDocumentation: http://rdoc.info/github/aef/linebreak-cli/\n\n\#{license}\n  TEXT\n      \n  exit false\nend\n"