Class: ToastAction
- Inherits:
-
NotificationsAction
- Object
- MacroObject
- Action
- NotificationsAction
- ToastAction
- Defined in:
- lib/ruby-macrodroid.rb
Overview
Category: Notifications
Instance Attribute Summary
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ ToastAction
constructor
A new instance of ToastAction.
- #invoke ⇒ Object
- #to_pc ⇒ Object
- #to_s ⇒ Object
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ ToastAction
Returns a new instance of ToastAction.
3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 |
# File 'lib/ruby-macrodroid.rb', line 3253 def initialize(h={}) if h[:msg] then h[:message_text] = h[:msg] h.delete :msg end = { message_text: '', image_resource_name: 'launcher_no_border', image_package_name: 'com.arlosoft.macrodroid', image_name: 'launcher_no_border', duration: 0, display_icon: true, background_color: -12434878, position: 0 } super(.merge h) end |
Instance Method Details
#invoke ⇒ Object
3275 3276 3277 |
# File 'lib/ruby-macrodroid.rb', line 3275 def invoke() super(@h[:message_text]) end |
#to_pc ⇒ Object
3279 3280 3281 |
# File 'lib/ruby-macrodroid.rb', line 3279 def to_pc() "popup_message '%s'" % @h[:message_text] end |
#to_s ⇒ Object
3283 3284 3285 |
# File 'lib/ruby-macrodroid.rb', line 3283 def to_s() "Popup Message '%s'" % @h[:message_text] end |