Class: Smartdict::Commands::VersionCommand

Inherits:
AbstractCommand show all
Includes:
Smartdict::Core
Defined in:
lib/smartdict/commands/version_command.rb

Overview

Displays information about the program. It’s executed when user runs one of:

  • smartdict -v

  • smartdict –version

  • smartdict version

Constant Summary

Constants inherited from AbstractCommand

AbstractCommand::INDENT_SIZE

Instance Method Summary collapse

Methods inherited from AbstractCommand

arguments, default, #extract_arguments_and_options, help_message, help_syntax_message, help_usage_message, inherited, #initialize, options, prog_name, run, #set_arguments!, #set_arguments_and_options!, set_description, set_name, #set_options!, set_summary, set_syntax, set_usage

Constructor Details

This class inherits a constructor from Smartdict::Commands::AbstractCommand

Instance Method Details

#executeObject

:nodoc:



22
23
24
25
26
27
# File 'lib/smartdict/commands/version_command.rb', line 22

def execute
  info = Smartdict.info
  puts "Smartdict core v#{info.version}\n" \
       "Author: #{info.author} (#{info.email})\n" \
       "URL: #{info.url}"
end