Module: CommandKit::Options::Verbose

Extended by:
ModuleMethods
Includes:
CommandKit::Options
Defined in:
lib/command_kit/options/verbose.rb

Overview

Defines a -v,--verbose option.

Examples

include CommandKit::Options::Verbose

def run(*argv)
  # ...
  puts "verbose output" if verbose?
  # ...
end

Defined Under Namespace

Modules: ModuleMethods

Constant Summary

Constants included from Printing

Printing::EOL

Instance Attribute Summary

Attributes included from CommandKit::Options

#options

Attributes included from Parser

#option_parser

Attributes included from CommandName

#command_name

Instance Method Summary collapse

Methods included from ModuleMethods

included

Methods included from CommandKit::Options

#help, #initialize

Methods included from ModuleMethods

#included

Methods included from Parser

#help, #help_options, #initialize, #main, #on_ambiguous_argument, #on_ambiguous_option, #on_invalid_argument, #on_invalid_option, #on_missing_argument, #on_needless_argument, #on_parse_error, #parse_options

Methods included from Parser::ModuleMethods

#included

Methods included from Printing

#print_error, #print_exception

Methods included from Stdio

#abort, #gets, #initialize, #print, #printf, #putc, #puts, #readline, #readlines, #stderr, #stdin, #stdout

Methods included from Main

#main, #run

Methods included from Main::ModuleMethods

#included

Methods included from Usage

#help, #help_usage, #usage

Methods included from Usage::ModuleMethods

#included

Methods included from Help

#help

Methods included from Help::ModuleMethods

#included

Methods included from CommandName

#initialize

Methods included from CommandName::ModuleMethods

#included

Methods included from Arguments

#help, #help_arguments, #main

Methods included from Arguments::ModuleMethods

#included

Instance Method Details

#verbose?Boolean

Determines if verbose mode is enabled.

Returns:

  • (Boolean)


57
58
59
# File 'lib/command_kit/options/verbose.rb', line 57

def verbose?
  @verbose
end