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.



122
123
124
125
126
127
128
129
130
# File 'lib/ruby-macrodroid/actions.rb', line 122

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



132
133
134
135
# File 'lib/ruby-macrodroid/actions.rb', line 132

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