class NotificationAction
Category: Notifications
Public Class Methods
new(h={})
click to toggle source
Calls superclass method
NotificationsAction::new
# File lib/ruby-macrodroid/actions.rb, line 2556 def initialize(h={}) h[:notification_subject] = h[:subject] if h[:subject] h[:notification_text] = h[:text] if h[:text] options = { ringtone_name: 'Default', notification_text: '', notification_subject: '', macro_guid_to_run: 0, notification_channel_type: 0, image_resource_id: 0, overwrite_existing: false, priority: 0, ringtone_index: 0, icon_bg_color: -1762269, run_macro_when_pressed: false } super(options.merge filter(options, h)) end
Public Instance Methods
to_s(colour: false, indent: 0)
click to toggle source
Calls superclass method
MacroObject#to_s
# File lib/ruby-macrodroid/actions.rb, line 2579 def to_s(colour: false, indent: 0) @s = "Display Notification\n" + \ "%s: %s" % [@h[:notification_subject], @h[:notification_text]] super() end