Class: MacWifi::CommandLineInterface::OpenResources
- Inherits:
-
Array
- Object
- Array
- MacWifi::CommandLineInterface::OpenResources
- Defined in:
- lib/mac-wifi/command_line_interface.rb
Instance Method Summary collapse
- #find_by_code(code) ⇒ Object
-
#help_string ⇒ Object
Ex: “(‘ipc’ (IP Chicken), ‘ipw’ (What is My IP), ‘spe’ (Speed Test))”.
Instance Method Details
#find_by_code(code) ⇒ Object
24 25 26 |
# File 'lib/mac-wifi/command_line_interface.rb', line 24 def find_by_code(code) detect { |resource| resource.code == code } end |
#help_string ⇒ Object
Ex: “(‘ipc’ (IP Chicken), ‘ipw’ (What is My IP), ‘spe’ (Speed Test))”
29 30 31 |
# File 'lib/mac-wifi/command_line_interface.rb', line 29 def help_string map(&:help_string).join(', ') end |