Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bc75e49382dc9b94ff02ee45f6438cf2 > files > 79

ruby-actionmailer-2.3.4-1mdv2010.0.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Module: ActionMailer::PartContainer</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Module</strong></td>
          <td class="class-name-in-header">ActionMailer::PartContainer</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../files/lib/action_mailer/part_container_rb.html">
                lib/action_mailer/part_container.rb
                </a>
        <br />
            </td>
        </tr>

        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
Accessors and helpers that <a href="Base.html">ActionMailer::Base</a> and
<a href="Part.html">ActionMailer::Part</a> have in common. Using these
helpers you can easily add subparts or attachments to your message:
</p>
<pre>
  def my_mail_message(...)
    ...
    part &quot;text/plain&quot; do |p|
      p.body &quot;hello, world&quot;
      p.transfer_encoding &quot;base64&quot;
    end

    attachment &quot;image/jpg&quot; do |a|
      a.body = File.read(&quot;hello.jpg&quot;)
      a.filename = &quot;hello.jpg&quot;
    end
  end
</pre>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000352">attachment</a>&nbsp;&nbsp;
      <a href="#M000351">part</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">parts</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc">
The list of subparts of this container

</td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000352" class="method-detail">
        <a name="M000352"></a>

        <div class="method-heading">
          <a href="PartContainer.src/M000352.html" target="Code" class="method-signature"
            onclick="popupCode('PartContainer.src/M000352.html');return false;">
          <span class="method-name">attachment</span><span class="method-args">(params, &amp;block)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Add an <a href="PartContainer.html#M000352">attachment</a> to a multipart
message. This is simply a <a href="PartContainer.html#M000351">part</a>
with the content-disposition set to &quot;<a
href="PartContainer.html#M000352">attachment</a>&quot;.
</p>
        </div>
      </div>

      <div id="method-M000351" class="method-detail">
        <a name="M000351"></a>

        <div class="method-heading">
          <a href="PartContainer.src/M000351.html" target="Code" class="method-signature"
            onclick="popupCode('PartContainer.src/M000351.html');return false;">
          <span class="method-name">part</span><span class="method-args">(params) {|part if block_given?| ...}</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Add a <a href="PartContainer.html#M000351">part</a> to a multipart message,
with the given content-type. The <a
href="PartContainer.html#M000351">part</a> itself is yielded to the block
so that other properties (charset, body, headers, etc.) can be set on it.
</p>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>