Class: CC::CLI::Version

Inherits:
Command show all
Defined in:
lib/cc/cli/version.rb

Constant Summary collapse

SHORT_HELP =
"Display the CLI version.".freeze

Constants inherited from Command

Command::CODECLIMATE_YAML, Command::NAMESPACE

Instance Method Summary collapse

Methods inherited from Command

[], abstract!, abstract?, all, command_name, #execute, help, inherited, #initialize, short_help, synopsis

Methods included from Output

#colorize, #fatal, #rainbow, #say, #success, #terminal, #warn

Constructor Details

This class inherits a constructor from CC::CLI::Command

Instance Method Details

#runObject



6
7
8
# File 'lib/cc/cli/version.rb', line 6

def run
  say version
end

#versionObject



10
11
12
13
# File 'lib/cc/cli/version.rb', line 10

def version
  path = File.expand_path("../../../../VERSION", __FILE__)
  @version ||= File.read(path)
end