Class: VolumeConstraint
- Inherits:
-
Constraint
- Object
- MacroObject
- Constraint
- VolumeConstraint
- 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 = {}) ⇒ VolumeConstraint
constructor
A new instance of VolumeConstraint.
- #to_s(colour: false, indent: 0) ⇒ Object
Methods inherited from Constraint
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ VolumeConstraint
Returns a new instance of VolumeConstraint.
1161 1162 1163 1164 1165 1166 1167 1168 1169 |
# File 'lib/ruby-macrodroid/constraints.rb', line 1161 def initialize(h={}) = { option: 0 } super(.merge filter(, h)) end |
Instance Method Details
#to_s(colour: false, indent: 0) ⇒ Object
1171 1172 1173 1174 1175 |
# File 'lib/ruby-macrodroid/constraints.rb', line 1171 def to_s(colour: false, indent: 0) a = ['Volume On', 'Vibrate Only' 'Silent', 'Vibrate or Silent'] "Ringer Volume\n " + a[@h[:option]] end |