Class: Geppeto::Commands::Wifi
- Inherits:
-
Object
- Object
- Geppeto::Commands::Wifi
- Defined in:
- lib/commands/wifi.rb
Instance Method Summary collapse
- #command(wifi_cmd) ⇒ Object
- #config(ssid, psk = nil) ⇒ Object
- #dhcp(hostname) ⇒ Object
-
#initialize(scout) ⇒ Wifi
constructor
A new instance of Wifi.
- #list ⇒ Object
- #reassociate ⇒ Object
- #report ⇒ Object
- #static(ip, netmask, gateway, dns) ⇒ Object
- #status ⇒ Object
Constructor Details
#initialize(scout) ⇒ Wifi
Returns a new instance of Wifi.
4 5 6 |
# File 'lib/commands/wifi.rb', line 4 def initialize(scout) @scout = scout end |
Instance Method Details
#command(wifi_cmd) ⇒ Object
36 37 38 |
# File 'lib/commands/wifi.rb', line 36 def command(wifi_cmd) @scout.request("wifi.command", wifi_cmd) end |
#config(ssid, psk = nil) ⇒ Object
20 21 22 |
# File 'lib/commands/wifi.rb', line 20 def config(ssid, psk = nil) @scout.request("wifi.config", ssid, psk) end |
#dhcp(hostname) ⇒ Object
24 25 26 |
# File 'lib/commands/wifi.rb', line 24 def dhcp(hostname) @scout.request("wifi.dhcp", hostname) end |
#list ⇒ Object
16 17 18 |
# File 'lib/commands/wifi.rb', line 16 def list @scout.request("wifi.list", ms: 5) end |
#reassociate ⇒ Object
32 33 34 |
# File 'lib/commands/wifi.rb', line 32 def reassociate @scout.request("wifi.reassociate") end |
#report ⇒ Object
8 9 10 |
# File 'lib/commands/wifi.rb', line 8 def report @scout.request("wifi.report") end |
#static(ip, netmask, gateway, dns) ⇒ Object
28 29 30 |
# File 'lib/commands/wifi.rb', line 28 def static(ip, netmask, gateway, dns) @scout.request("wifi.static", ip, netmask, gateway, dns) end |
#status ⇒ Object
12 13 14 |
# File 'lib/commands/wifi.rb', line 12 def status @scout.request("wifi.status") end |