Class: VCLog::CLI::Version

Inherits:
Abstract show all
Defined in:
lib/vclog/cli/version.rb

Overview

Display the current version.

Instance Attribute Summary

Attributes inherited from Abstract

#arguments

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Abstract

inherited, #initialize, #options, #repo, run, #run

Constructor Details

This class inherits a constructor from VCLog::CLI::Abstract

Class Method Details

.termsObject



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

def self.terms
  ['version']
end

Instance Method Details

#executeObject



24
25
26
# File 'lib/vclog/cli/version.rb', line 24

def execute
  puts repo.version
end

#parserObject



15
16
17
18
19
20
21
# File 'lib/vclog/cli/version.rb', line 15

def parser
  super do |opt|
    opt.banner = "Usage: vclog version"
    opt.separator(" ")
    opt.separator("Display the current version number.")
  end
end