Class: Zillabyte::Command::Version

Inherits:
Base
  • Object
show all
Defined in:
lib/zillabyte/cli/version.rb

Overview

display version number

Constant Summary

Constants inherited from Base

Base::META_COLUMNS

Instance Attribute Summary

Attributes inherited from Base

#args, #options

Instance Method Summary collapse

Methods inherited from Base

#api, #initialize, namespace

Methods included from Helpers

#app, #ask, #command, #create_git_remote, #display, #error, #extract_app_from_git_config, #extract_app_in_dir, #format_with_bang, #friendly_dir, #get_flow_ui_link, #get_info, #get_rich_info, #git, #handle_downloading_manifest, #has_git?, #longest, #read_multiline, #truncate_message, #version_okay?, #with_tty

Constructor Details

This class inherits a constructor from Zillabyte::Command::Base

Instance Method Details

#index(*direct_args) ⇒ Object

version

display version number of the CLI



10
11
12
13
14
15
16
# File 'lib/zillabyte/cli/version.rb', line 10

def index(*direct_args)
  if options[:output_type] == "json"
    display( {:version => Zillabyte::CLI::VERSION}.to_json )
  else
    display "Zillabyte CLI Version #{Zillabyte::CLI::VERSION}"
  end
end