Class: NotificationAction
- Inherits:
-
NotificationsAction
- Object
- MacroObject
- Action
- NotificationsAction
- NotificationAction
- Defined in:
- lib/ruby-macrodroid.rb
Overview
Category: Notifications
Instance Attribute Summary
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ NotificationAction
constructor
A new instance of NotificationAction.
- #to_s ⇒ Object
Methods inherited from Action
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ NotificationAction
Returns a new instance of NotificationAction.
3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 |
# File 'lib/ruby-macrodroid.rb', line 3395 def initialize(h={}) h[:notification_subject] = h[:subject] if h[:subject] h[:notification_text] = h[:text] if h[:text] = { 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(.merge filter(, h)) end |
Instance Method Details
#to_s ⇒ Object
3418 3419 3420 |
# File 'lib/ruby-macrodroid.rb', line 3418 def to_s() 'Display Notification: ' + "%s: %s" % [@h[:notification_subject], @h[:notification_text]] end |