Class: Trigger

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

Instance Attribute Summary

Attributes inherited from MacroObject

#options, #type

Instance Method Summary collapse

Methods inherited from MacroObject

#to_h

Constructor Details

#initialize(h = {}) ⇒ Trigger

Returns a new instance of Trigger.



516
517
518
519
# File 'lib/ruby-macrodroid.rb', line 516

def initialize(h={})    
  super({fakeIcon: 0}.merge(h))
  @list << 'fakeIcon'
end

Instance Method Details

#match?(detail = {}) ⇒ Boolean

Returns:

  • (Boolean)


521
522
523
524
525
# File 'lib/ruby-macrodroid.rb', line 521

def match?(detail={})    

  detail.all? {|key,value| @h[key] == value}
  
end