Class: WifiWand::Commands::NetworkName

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

Constant Summary

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

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

Constructor Details

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

Instance Method Details

#call(*args) ⇒ Object



18
19
20
21
22
23
# File 'lib/wifi_wand/commands/network_name.rb', line 18

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

  name = model.connected_network_name
  output_support.handle_output(name, -> { %{Network (SSID) name: "#{name || '[none]'}"} })
end