Class: NotificationPresentConstraint

Inherits:
Constraint show all
Defined in:
lib/ruby-macrodroid/constraints.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.



1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
# File 'lib/ruby-macrodroid/constraints.rb', line 1034

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, indent: 0) ⇒ Object Also known as: to_summary



1051
1052
1053
# File 'lib/ruby-macrodroid/constraints.rb', line 1051

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