Class: Mongify::CLI::VersionCommand

Inherits:
Object
  • Object
show all
Defined in:
lib/mongify/cli/version_command.rb

Overview

A command to report the application’s current version number.

Instance Method Summary collapse

Constructor Details

#initialize(progname) ⇒ VersionCommand

Returns a new instance of VersionCommand.



9
10
11
# File 'lib/mongify/cli/version_command.rb', line 9

def initialize(progname)
  @progname = progname
end

Instance Method Details

#execute(view) ⇒ Object

Executes version command



13
14
15
16
# File 'lib/mongify/cli/version_command.rb', line 13

def execute(view)
  view.output("#{@progname} #{Mongify::VERSION}\n")
  view.report_success
end