Class: SetAirplaneModeAction
- Inherits:
-
ConnectivityAction
- Object
- MacroObject
- Action
- ConnectivityAction
- SetAirplaneModeAction
- 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 = {}) ⇒ SetAirplaneModeAction
constructor
A new instance of SetAirplaneModeAction.
- #to_s(colour: false, indent: 0) ⇒ Object
Methods inherited from Action
Methods included from ObjectX
#action_to_object, #object_create, #varify
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ SetAirplaneModeAction
Returns a new instance of SetAirplaneModeAction.
785 786 787 788 789 790 791 792 793 794 |
# File 'lib/ruby-macrodroid/actions.rb', line 785 def initialize(h={}) = { device_name: '', state: 1 } super(.merge h) end |
Instance Method Details
#to_s(colour: false, indent: 0) ⇒ Object
796 797 798 799 800 801 802 |
# File 'lib/ruby-macrodroid/actions.rb', line 796 def to_s(colour: false, indent: 0) state = ['On', 'Off', 'Toggle'][@h[:state]] @s = 'Airplane Mode ' + state super() end |