Class: SetAutoRotateAction
- Inherits:
-
DeviceSettingsAction
- Object
- MacroObject
- Action
- DeviceSettingsAction
- SetAutoRotateAction
- Defined in:
- lib/ruby-macrodroid/actions.rb
Overview
Category: Device Settings
Instance Attribute Summary
Attributes inherited from Action
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ SetAutoRotateAction
constructor
A new instance of SetAutoRotateAction.
- #to_s(colour: false, indent: 0) ⇒ Object (also: #to_summary)
Methods inherited from Action
Methods included from ObjectX
#action_to_object, #object_create, #varify
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ SetAutoRotateAction
Returns a new instance of SetAutoRotateAction.
1415 1416 1417 1418 1419 1420 1421 1422 1423 |
# File 'lib/ruby-macrodroid/actions.rb', line 1415 def initialize(h={}) = { state: 0 } super(.merge h) end |
Instance Method Details
#to_s(colour: false, indent: 0) ⇒ Object Also known as: to_summary
1425 1426 1427 1428 1429 1430 1431 |
# File 'lib/ruby-macrodroid/actions.rb', line 1425 def to_s(colour: false, indent: 0) #'SetAutoRotateAction ' + @h.inspect @s = 'Auto Rotate ' + %w(On Off Toggle)[@h[:state]] super() end |