Class: WifiWand::CommandLineInterface::OpenResources

Inherits:
Array
  • Object
show all
Defined in:
lib/wifi-wand/command_line_interface.rb

Instance Method Summary collapse

Instance Method Details

#find_by_code(code) ⇒ Object



26
27
28
# File 'lib/wifi-wand/command_line_interface.rb', line 26

def find_by_code(code)
  detect { |resource| resource.code == code }
end

#help_stringObject

Ex: “(‘ipc’ (IP Chicken), ‘ipw’ (What is My IP), ‘spe’ (Speed Test))”



31
32
33
# File 'lib/wifi-wand/command_line_interface.rb', line 31

def help_string
  map(&:help_string).join(', ')
end