Class: LaunchShortcutAction

Inherits:
ApplicationAction show all
Defined in:
lib/ruby-macrodroid/actions.rb

Overview

Category: Applications

Instance Attribute Summary

Attributes inherited from Action

#constraints

Attributes inherited from MacroObject

#options, #siguid, #type

Instance Method Summary collapse

Methods inherited from Action

#invoke

Methods included from ObjectX

#action_to_object, #object_create, #varify

Methods inherited from MacroObject

#to_h

Constructor Details

#initialize(h = {}) ⇒ LaunchShortcutAction

Returns a new instance of LaunchShortcutAction.



155
156
157
158
159
160
161
162
163
# File 'lib/ruby-macrodroid/actions.rb', line 155

def initialize(h={})
  
  options = {
    :app_name=>"Amazon Alexa", :intent_encoded=>"", :name=>"Ask Alexa"
  }

  super(options.merge h)

end

Instance Method Details

#to_s(colour: false, indent: 0) ⇒ Object Also known as: to_summary



165
166
167
168
# File 'lib/ruby-macrodroid/actions.rb', line 165

def to_s(colour: false, indent: 0)
  @s = "Launch Shortcut: " + @h[:app_name] + "\n" + @h[:name]
  super()
end