Class: BluetoothTrigger

Inherits:
Trigger show all
Defined in:
lib/ruby-macrodroid.rb

Overview

Category: Connectivity

Instance Attribute Summary

Attributes inherited from Trigger

#constraints

Attributes inherited from MacroObject

#options, #siguid, #type

Instance Method Summary collapse

Methods inherited from Trigger

#match?

Methods inherited from MacroObject

#to_h

Constructor Details

#initialize(h = {}) ⇒ BluetoothTrigger

Returns a new instance of BluetoothTrigger.



1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
# File 'lib/ruby-macrodroid.rb', line 1667

def initialize(h={})

  options = {
    device_name: 'Any Device',
    bt_state: 0,
    any_device: false
  }

  super(options.merge h)

end

Instance Method Details

#to_s(colour: false) ⇒ Object Also known as: to_summary



1679
1680
1681
# File 'lib/ruby-macrodroid.rb', line 1679

def to_s(colour: false)
  'BluetoothTrigger ' + @h.inspect
end