Class: HeadphonesTrigger

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 = {}) ⇒ HeadphonesTrigger

Returns a new instance of HeadphonesTrigger.



1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
# File 'lib/ruby-macrodroid.rb', line 1692

def initialize(h={})

  options = {
    headphones_connected: true,
    mic_option: 0
  }

  super(options.merge h)

end

Instance Method Details

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



1703
1704
1705
# File 'lib/ruby-macrodroid.rb', line 1703

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