class SetWifiAction
Category: Connectivity
Public Class Methods
new(h={})
click to toggle source
Calls superclass method
ConnectivityAction::new
# File lib/ruby-macrodroid/actions.rb, line 815 def initialize(h={}) options = { ssid: '[Select Wifi]', network_id: 0, state: 0 } super(options.merge h) end
Public Instance Methods
to_s(colour: false, indent: 0)
click to toggle source
Calls superclass method
MacroObject#to_s
# File lib/ruby-macrodroid/actions.rb, line 827 def to_s(colour: false, indent: 0) @s = if @h[:state] <= 2 then state = %w(Enable Disable Toggle)[@h[:state]] state + ' Wifi' else "Connected to Network\n%s" % @h[:ssid] end super() end