Class: BluetoothConstraint
- Inherits:
-
Constraint
- Object
- MacroObject
- Constraint
- BluetoothConstraint
- Defined in:
- lib/ruby-macrodroid.rb
Overview
Category: Connectivity
Instance Attribute Summary
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ BluetoothConstraint
constructor
A new instance of BluetoothConstraint.
- #to_s ⇒ Object
Methods inherited from Constraint
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ BluetoothConstraint
Returns a new instance of BluetoothConstraint.
4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 |
# File 'lib/ruby-macrodroid.rb', line 4100 def initialize(h={}) = { any_device: false, bt_state: 0, device_name: 'Any Device' } super(.merge h) end |
Instance Method Details
#to_s ⇒ Object
4112 4113 4114 4115 |
# File 'lib/ruby-macrodroid.rb', line 4112 def to_s() device = @h[:device_name] #== 'Any Device' ? 'Any' : @h[:device_name] "Device Connected (%s)" % device end |