Method: MacWifi::MacOsModel#wifi_on
- Defined in:
- lib/mac-wifi/mac_os_model.rb
#wifi_on ⇒ Object
Turns wifi on.
169 170 171 172 173 |
# File 'lib/mac-wifi/mac_os_model.rb', line 169 def wifi_on return if wifi_on? run_os_command("networksetup -setairportpower #{wifi_hardware_port} on") wifi_on? ? nil : raise("Wifi could not be enabled.") end |