Class: SendEmailAction

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

Overview

Category: Messaging

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 = {}) ⇒ SendEmailAction

Returns a new instance of SendEmailAction.



2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
# File 'lib/ruby-macrodroid/actions.rb', line 2162

def initialize(h={})

  options = {
    subject: '',
    body: '',
    email_address: '',
    from_email_address: '',
    attach_user_log: false,
    attach_log: false,
    send_option: 0
  }

  super(options.merge h)

end

Instance Method Details

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



2178
2179
2180
2181
2182
# File 'lib/ruby-macrodroid/actions.rb', line 2178

def to_s(colour: false, indent: 0)
  recipient = @h[:email_address]
  @s = 'Send EmailAction' + "\nTo: " + recipient #+ ' ' + @h.inspect
  super()
end