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



28
29
30
# File 'lib/wifi-wand/command_line_interface.rb', line 28

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))”



33
34
35
# File 'lib/wifi-wand/command_line_interface.rb', line 33

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