Class: Xcodeproj::XCScheme::SendEmailActionContent

Inherits:
XMLElementWrapper show all
Defined in:
lib/xcodeproj/scheme/send_email_action_content.rb

Overview

This class wraps a 'ActionContent' node of type 'Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.SendEmailAction' of a .xcscheme XML file

Instance Attribute Summary

Attributes inherited from XMLElementWrapper

#xml_element

Instance Method Summary collapse

Methods inherited from XMLElementWrapper

#to_s

Constructor Details

#initialize(node = nil) ⇒ SendEmailActionContent

Returns a new instance of SendEmailActionContent.

Parameters:

  • node (REXML::Element) (defaults to: nil)

    The 'ActionContent' XML node that this object will wrap. If nil, will create a default XML node to use.


11
12
13
14
15
16
17
18
# File 'lib/xcodeproj/scheme/send_email_action_content.rb', line 11

def initialize(node = nil)
  create_xml_element_with_fallback(node, 'ActionContent') do
    self.title = 'Send Email'
    # For some reason this is not visible in Xcode's UI and it's always set to 'NO'
    # couldn't find much documentation on it so it might be safer to keep it read only
    @xml_element.attributes['attachLogToEmail'] = 'NO'
  end
end

Instance Method Details

#attach_log_to_email?Bool

Returns Whether or not this action should attach log to email.

Returns:

  • (Bool)

    Whether or not this action should attach log to email


23
24
25
# File 'lib/xcodeproj/scheme/send_email_action_content.rb', line 23

def attach_log_to_email?
  string_to_bool(@xml_element.attributes['attachLogToEmail'])
end

#email_bodyString

Returns The email body of this ActionContent.

Returns:

  • (String)

    The email body of this ActionContent


72
73
74
# File 'lib/xcodeproj/scheme/send_email_action_content.rb', line 72

def email_body
  @xml_element.attributes['emailBody']
end

#email_body=(value) ⇒ Object

Parameters:

  • value (String)

    Set the email body of this ActionContent


79
80
81
# File 'lib/xcodeproj/scheme/send_email_action_content.rb', line 79

def email_body=(value)
  @xml_element.attributes['emailBody'] = value
end

#email_recipientString

Returns The email recipient of this ActionContent.

Returns:

  • (String)

    The email recipient of this ActionContent


44
45
46
# File 'lib/xcodeproj/scheme/send_email_action_content.rb', line 44

def email_recipient
  @xml_element.attributes['emailRecipient']
end

#email_recipient=(value) ⇒ Object

Parameters:

  • value (String)

    Set the email recipient of this ActionContent


51
52
53
# File 'lib/xcodeproj/scheme/send_email_action_content.rb', line 51

def email_recipient=(value)
  @xml_element.attributes['emailRecipient'] = value
end

#email_subjectString

Returns The email subject of this ActionContent.

Returns:

  • (String)

    The email subject of this ActionContent


58
59
60
# File 'lib/xcodeproj/scheme/send_email_action_content.rb', line 58

def email_subject
  @xml_element.attributes['emailSubject']
end

#email_subject=(value) ⇒ Object

Parameters:

  • value (String)

    Set the email subject of this ActionContent


65
66
67
# File 'lib/xcodeproj/scheme/send_email_action_content.rb', line 65

def email_subject=(value)
  @xml_element.attributes['emailSubject'] = value
end

#titleString

Returns The title of this ActionContent.

Returns:

  • (String)

    The title of this ActionContent


30
31
32
# File 'lib/xcodeproj/scheme/send_email_action_content.rb', line 30

def title
  @xml_element.attributes['title']
end

#title=(value) ⇒ Object

Parameters:

  • value (String)

    Set the title of this ActionContent


37
38
39
# File 'lib/xcodeproj/scheme/send_email_action_content.rb', line 37

def title=(value)
  @xml_element.attributes['title'] = value
end