Class: NotificationTrigger

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

Overview

Category: Device Events

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

Returns a new instance of NotificationTrigger.



2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
# File 'lib/ruby-macrodroid.rb', line 2299

def initialize(h={})

  options = {
    text_content: '',
    package_name_list: ["Any Application"],
    application_name_list: ["Any Application"],
    exclude_apps: false,
    ignore_ongoing: true,
    option: 0,
    exact_match: false,
    excludes: false,
    sound_option: 0,
    supress_multiples: true,
    enable_regex: false
  }

  super(options.merge h)

end

Instance Method Details

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



2319
2320
2321
# File 'lib/ruby-macrodroid.rb', line 2319

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