Class: Mongify::CLI::Command::Version
- Inherits:
-
Object
- Object
- Mongify::CLI::Command::Version
- Defined in:
- lib/mongify/cli/command/version.rb
Overview
A command to report the application’s current version number.
Instance Method Summary collapse
-
#execute(view) ⇒ Object
Executes version command.
-
#initialize(progname) ⇒ Version
constructor
A new instance of Version.
Constructor Details
#initialize(progname) ⇒ Version
Returns a new instance of Version.
9 10 11 |
# File 'lib/mongify/cli/command/version.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/command/version.rb', line 13 def execute(view) view.output("#{@progname} #{Mongify::VERSION}\n") view.report_success end |