Module: CommandKit::Options::Quiet

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

Overview

Defines a -q,--quiet option.

Examples

include CommandKit::Options::Quiet

def run(*argv)
  # ...
  puts "verbose output" unless quiet?
  # ...
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

#quiet?Boolean

Determines if quiet mode is enabled.

Returns:

  • (Boolean)


53
54
55
# File 'lib/command_kit/options/quiet.rb', line 53

def quiet?
  @quiet
end