Class: WifiWand::Commands::Quit

Inherits:
Base
  • Object
show all
Defined in:
lib/wifi_wand/commands/quit.rb

Constant Summary collapse

EXTRA_ALIASES =
%w[x xit].freeze

Constants inherited from Base

Base::DEFAULT_INVOCATION_OPTIONS

Instance Attribute Summary

Attributes inherited from Base

#cli, #metadata

Instance Method Summary collapse

Methods inherited from Base

allow_invocation_options, allowed_invocation_options, #bind, binding_sources, binds, command_metadata, declared_metadata, #initialize, #validate_options

Constructor Details

This class inherits a constructor from WifiWand::Commands::Base

Instance Method Details

#aliasesObject



18
19
20
# File 'lib/wifi_wand/commands/quit.rb', line 18

def aliases
  super + EXTRA_ALIASES
end

#call(*args) ⇒ Object



32
33
34
35
36
# File 'lib/wifi_wand/commands/quit.rb', line 32

def call(*args)
  validate_max_arguments!(args, 0)

  cli.quit
end

#help_textObject



22
23
24
25
26
27
28
29
30
# File 'lib/wifi_wand/commands/quit.rb', line 22

def help_text
  <<~HELP
    #{.usage}

    #{.description}

    Also available as: x, xit
  HELP
end