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.
2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 |
# File 'lib/ruby-macrodroid.rb', line 2952 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
2974 2975 2976 |
# File 'lib/ruby-macrodroid.rb', line 2974 def invoke() super(@h[:message_text]) end |
#to_pc ⇒ Object
2978 2979 2980 |
# File 'lib/ruby-macrodroid.rb', line 2978 def to_pc() "popup_message '%s'" % @h[:message_text] end |
#to_s ⇒ Object
2982 2983 2984 |
# File 'lib/ruby-macrodroid.rb', line 2982 def to_s() "Popup Message '%s'" % @h[:message_text] end |