Class: SetHotspotAction
- Inherits:
-
ConnectivityAction
- Object
- MacroObject
- Action
- ConnectivityAction
- SetHotspotAction
- Defined in:
- lib/ruby-macrodroid/actions.rb
Instance Attribute Summary
Attributes inherited from Action
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ SetHotspotAction
constructor
A new instance of SetHotspotAction.
- #to_s(colour: false, indent: 0) ⇒ Object
Methods inherited from Action
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ SetHotspotAction
Returns a new instance of SetHotspotAction.
645 646 647 648 649 650 651 652 653 654 |
# File 'lib/ruby-macrodroid/actions.rb', line 645 def initialize(h={}) = { device_name: "", state: 0, turn_wifi_on: true, use_legacy_mechanism: false, mechanism: 0 } super(.merge h) end |
Instance Method Details
#to_s(colour: false, indent: 0) ⇒ Object
656 657 658 659 |
# File 'lib/ruby-macrodroid/actions.rb', line 656 def to_s(colour: false, indent: 0) action = @h[:turn_wifi_on] ? 'Enable' : 'Disable' action + ' HotSpot' end |