Class: ApplicationLaunchedTrigger

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

Overview

Category: Applications

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

Returns a new instance of ApplicationLaunchedTrigger.



122
123
124
125
126
127
128
129
130
131
132
# File 'lib/ruby-macrodroid/triggers.rb', line 122

def initialize(h={})

  options = {
    application_name_list: ["Chrome"],
    package_name_list: ["com.android.chrome"],
    launched: true
  }

  super(options.merge h)

end

Instance Method Details

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



134
135
136
# File 'lib/ruby-macrodroid/triggers.rb', line 134

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