Class: SetWifiAction
- Inherits:
-
ConnectivityAction
- Object
- MacroObject
- Action
- ConnectivityAction
- SetWifiAction
- Defined in:
- lib/ruby-macrodroid/actions.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(colour: false, indent: 0) ⇒ Object
Methods inherited from Action
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ SetWifiAction
Returns a new instance of SetWifiAction.
580 581 582 583 584 585 586 587 588 589 590 |
# File 'lib/ruby-macrodroid/actions.rb', line 580 def initialize(h={}) = { ssid: '[Select Wifi]', network_id: 0, state: 0 } super(.merge h) end |
Instance Method Details
#to_s(colour: false, indent: 0) ⇒ Object
592 593 594 595 |
# File 'lib/ruby-macrodroid/actions.rb', line 592 def to_s(colour: false, indent: 0) action = @h[:state] == 0 ? 'Enable' : 'Disable' action + ' Wifi' end |