Class: Rbnotes::Commands::Builtins::Version

Inherits:
Command
  • Object
show all
Defined in:
lib/rbnotes/commands.rb

Instance Method Summary collapse

Instance Method Details

#descriptionObject



92
93
94
# File 'lib/rbnotes/commands.rb', line 92

def description
  "Print version"
end

#execute(_, _) ⇒ Object



96
97
98
99
100
# File 'lib/rbnotes/commands.rb', line 96

def execute(_, _)
  rbnotes_version = "#{Rbnotes::NAME} #{Rbnotes::VERSION} (#{Rbnotes::RELEASE})"
  textrepo_version = "textrepo #{Textrepo::VERSION}"
  puts "#{rbnotes_version} [#{textrepo_version}]"
end

#helpObject



102
103
104
105
106
107
108
109
# File 'lib/rbnotes/commands.rb', line 102

def help
  puts <<VERSION
usage:
    #{Rbnotes::NAME} version

Print version of #{Rbnotes::NAME} and release date.
VERSION
end