Class: ScreenOnAction
- Inherits:
-
ScreenAction
- Object
- MacroObject
- Action
- ScreenAction
- ScreenOnAction
- Defined in:
- lib/ruby-macrodroid/actions.rb
Overview
Category: Screen
Instance Attribute Summary
Attributes inherited from Action
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ ScreenOnAction
constructor
A new instance of ScreenOnAction.
- #to_s(colour: false, indent: 0) ⇒ Object (also: #to_summary)
Methods inherited from Action
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ ScreenOnAction
Returns a new instance of ScreenOnAction.
2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 |
# File 'lib/ruby-macrodroid/actions.rb', line 2328 def initialize(h={}) = { pie_lock_screen: false, screen_off: true, screen_off_no_lock: false, screen_on_alternative: false } super(.merge h) end |
Instance Method Details
#to_s(colour: false, indent: 0) ⇒ Object Also known as: to_summary
2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 |
# File 'lib/ruby-macrodroid/actions.rb', line 2341 def to_s(colour: false, indent: 0) state = @h[:screen_off] ? 'Off' : 'On' state += ' ' + 'No Lock (root only)' if @h[:screen_off_no_lock] #state += ' ' + '(Alternative)' if @h[:screen_on_alternative] @s = 'Screen ' + state super() end |