Class: SetAirplaneModeAction
- Inherits:
-
ConnectivityAction
- Object
- MacroObject
- Action
- ConnectivityAction
- SetAirplaneModeAction
- 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 = {}) ⇒ SetAirplaneModeAction
constructor
A new instance of SetAirplaneModeAction.
- #to_s(colour: false) ⇒ Object
Methods inherited from Action
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ SetAirplaneModeAction
Returns a new instance of SetAirplaneModeAction.
3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 |
# File 'lib/ruby-macrodroid.rb', line 3080 def initialize(h={}) = { device_name: '', state: 1 } super(.merge h) end |
Instance Method Details
#to_s(colour: false) ⇒ Object
3091 3092 3093 3094 3095 3096 3097 |
# File 'lib/ruby-macrodroid.rb', line 3091 def to_s(colour: false) state = ['On', 'Off', 'Toggle'][@h[:state]] @s = 'Airplane Mode ' + state + "\n" super(colour: colour) end |