Class: ScreenOnOffConstraint
- Inherits:
- 
      Constraint
      
        - Object
- MacroObject
- Constraint
- ScreenOnOffConstraint
 
- Defined in:
- lib/ruby-macrodroid/constraints.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, indent: 0) ⇒ Object (also: #to_summary)
Methods inherited from Constraint
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ ScreenOnOffConstraint
| 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 | # File 'lib/ruby-macrodroid/constraints.rb', line 1236 def initialize(h={}) = { a: true, screen_on: true } super(.merge h) end | 
Instance Method Details
#to_s(colour: false, indent: 0) ⇒ Object Also known as: to_summary
| 1247 1248 1249 | # File 'lib/ruby-macrodroid/constraints.rb', line 1247 def to_s(colour: false, indent: 0) 'Screen ' + (@h[:screen_on] ? 'On' : 'Off') end |