Module: CommandKit::Options::Quiet::ModuleMethods Private

Included in:
CommandKit::Options::Quiet
Defined in:
lib/command_kit/options/quiet.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#included(context) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Defines a -q, --quiet option.

Parameters:



33
34
35
36
37
38
39
40
41
42
43
# File 'lib/command_kit/options/quiet.rb', line 33

def included(context)
  super(context)

  if context.class == Module
    context.extend ModuleMethods
  else
    context.option :quiet, short: '-q', desc: 'Enables quiet output' do
      @quiet = true
    end
  end
end