Class: ScreenOnOffConstraint
- Inherits:
-
Constraint
- Object
- MacroObject
- Constraint
- ScreenOnOffConstraint
- Defined in:
- lib/ruby-macrodroid.rb
Overview
Category: Screen and Speaker
Instance Attribute Summary
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ ScreenOnOffConstraint
constructor
A new instance of ScreenOnOffConstraint.
- #to_s(colour: false) ⇒ Object (also: #to_summary)
Methods inherited from Constraint
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ ScreenOnOffConstraint
Returns a new instance of ScreenOnOffConstraint.
5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 |
# File 'lib/ruby-macrodroid.rb', line 5791 def initialize(h={}) = { a: true, screen_on: true } super(.merge h) end |
Instance Method Details
#to_s(colour: false) ⇒ Object Also known as: to_summary
5802 5803 5804 |
# File 'lib/ruby-macrodroid.rb', line 5802 def to_s(colour: false) 'Screen ' + (@h[:screen_on] ? 'On' : 'Off') end |