Class: HeadphonesConnectionConstraint
- Inherits:
-
Constraint
- Object
- MacroObject
- Constraint
- HeadphonesConnectionConstraint
- Defined in:
- lib/ruby-macrodroid/constraints.rb
Overview
Category: Media
Instance Attribute Summary
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ HeadphonesConnectionConstraint
constructor
A new instance of HeadphonesConnectionConstraint.
- #to_s(colour: false, indent: 0) ⇒ Object (also: #to_summary)
Methods inherited from Constraint
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ HeadphonesConnectionConstraint
Returns a new instance of HeadphonesConnectionConstraint.
978 979 980 981 982 983 984 985 986 |
# File 'lib/ruby-macrodroid/constraints.rb', line 978 def initialize(h={}) = { connected: true } super(.merge h) end |
Instance Method Details
#to_s(colour: false, indent: 0) ⇒ Object Also known as: to_summary
988 989 990 991 |
# File 'lib/ruby-macrodroid/constraints.rb', line 988 def to_s(colour: false, indent: 0) connection = @h[:connected] ? 'Connected' : 'Disconnected' 'Headphones ' + connection end |