Class: SetWifiAction
- Inherits:
-
ConnectivityAction
- Object
- MacroObject
- Action
- ConnectivityAction
- SetWifiAction
- Defined in:
- lib/ruby-macrodroid.rb
Overview
Category: Connectivity
Instance Attribute Summary
Attributes inherited from Action
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ SetWifiAction
constructor
A new instance of SetWifiAction.
- #to_s ⇒ Object
Methods inherited from Action
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ SetWifiAction
Returns a new instance of SetWifiAction.
2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 |
# File 'lib/ruby-macrodroid.rb', line 2732 def initialize(h={}) = { ssid: '[Select Wifi]', network_id: 0, state: 0 } super(.merge h) end |
Instance Method Details
#to_s ⇒ Object
2744 2745 2746 2747 |
# File 'lib/ruby-macrodroid.rb', line 2744 def to_s() action = @h[:state] == 0 ? 'Enable' : 'Disable' action + ' Wifi' end |