Class: NotificationPresentConstraint

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

Overview

Category: Notification

Instance Attribute Summary

Attributes inherited from MacroObject

#options, #siguid, #type

Instance Method Summary collapse

Methods inherited from Constraint

#match?

Methods inherited from MacroObject

#to_h

Constructor Details

#initialize(h = {}) ⇒ NotificationPresentConstraint

Returns a new instance of NotificationPresentConstraint.



5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
# File 'lib/ruby-macrodroid.rb', line 5603

def initialize(h={})

  options = {
    enable_regex: false,
    application_name_list: ["All applications"],
    exact_match: false,
    excludes: false,
    excludes_apps: -1,
    option: 0,
    package_name_list: ["allApplications"],
    text_content: ''
  }

  super(options.merge h)

end

Instance Method Details

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



5620
5621
5622
# File 'lib/ruby-macrodroid.rb', line 5620

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