/usr/share/doc/ruby-rubymail-doc/html/classes/RMail/Address.html is in ruby-rubymail-doc 1.0.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 | <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: RMail::Address</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel=StyleSheet href="../.././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript" language="JavaScript">
<!--
function popCode(url) {
window.open(url, "Code",
"resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
//-->
</script>
</head>
<body bgcolor="white">
<table summary="Information on class" width="100%" border="0" cellspacing="0">
<tr class="title-row">
<td class="big-title-font">
<sup><font color="aqua">Class</font></sup> RMail::Address
</td>
<td align="right">
<table summary="layout" cellspacing="0" cellpadding="2">
<tr valign="top">
<td class="small-title-font">In:</td>
<td class="small-title-font">
<a href="../../files/lib/rmail/address_rb.html" class="aqua">
lib/rmail/address.rb
</a>
<br />
</td>
</tr>
<tr>
<td class="small-title-font">Parent:</td>
<td class="small-title-font">
Object
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- banner header -->
<div class="description"><p>
This class provides the following functionality:
</p>
<ul>
<li>Parses RFC2822 address lists into a list of <a
href="Address.html">Address</a> objects (see <a
href="Address/Parser.html#M000122">#parse</a>).
</li>
<li>Format <a href="Address.html">Address</a> objects as appropriate for
insertion into email messages (see <a
href="Address/List.html#M000128">#format</a>).
</li>
<li>Allows manipulation of the various parts of the address (see <a
href="Address.html#M000109">#local=</a>, <a
href="Address.html#M000116">#domain=</a>, <a
href="Address.html#M000111">#display_name=</a>, <a
href="Address.html#M000114">#comments=</a>).
</li>
</ul>
</div>
<table summary="Methods" cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Methods</td></tr>
</table>
<div class="name-list">
<a href="#M000105"><=></a>
<a href="#M000117">address</a>
<a href="#M000113">comments</a>
<a href="#M000114">comments=</a>
<a href="#M000110">display_name</a>
<a href="#M000111">display_name=</a>
<a href="#M000115">domain</a>
<a href="#M000116">domain=</a>
<a href="#M000107">eql?</a>
<a href="#M000118">format</a>
<a href="#M000106">hash</a>
<a href="#M000108">local</a>
<a href="#M000109">local=</a>
<a href="#M000112">name</a>
<a href="#M000104">new</a>
<a href="#M000120">parse</a>
<a href="#M000119">to_str</a>
</div>
<table summary="List of classes" cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Classes and Modules</td></tr>
</table>
<div class="classlist">
Class <a href="Address/List.html" class="link">RMail::Address::List</a><br />
Class <a href="Address/Parser.html" class="link">RMail::Address::Parser</a><br />
</div>
<table summary="Included modules" cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Included modules</td></tr>
</table>
<div class="name-list">
<span class="method-name">Comparable</span>
</div>
<table summary="Method list" cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Public Class methods</td></tr>
</table>
<table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="M000104"></a>
<a href="Address.src/M000104.html" target="Code" class="methodtitle"
onClick="popCode('Address.src/M000104.html');return false;">
<b>new</b>(string = nil)
</a>
</td></tr>
</table>
<div class="description">
<p>
Create a new address. If the <tt>string</tt> argument is not nil, it is
parsed for mail addresses and if one is found, it is used to initialize
this object.
</p>
</div>
<table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="M000120"></a>
<a href="Address.src/M000120.html" target="Code" class="methodtitle"
onClick="popCode('Address.src/M000120.html');return false;">
<b>parse</b>(string)
</a>
</td></tr>
</table>
<div class="description">
<p>
Given a string, this function attempts to extract mailing addresses from it
and returns an <a href="Address/List.html">RMail::Address::List</a> of
those addresses (<a href="Address/List.html">RMail::Address::List</a> is a
subclass of Array).
</p>
<p>
This is identical to using a <a
href="Address/Parser.html">RMail::Address::Parser</a> directly like this:
</p>
<pre>
RMail::Address::Parser.new(string).parse
</pre>
</div>
<table summary="Method list" cellpadding="5" width="100%">
<tr><td class="tablesubtitle">Public Instance methods</td></tr>
</table>
<table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="M000105"></a>
<a href="Address.src/M000105.html" target="Code" class="methodtitle"
onClick="popCode('Address.src/M000105.html');return false;">
<b><=></b>(other)
</a>
</td></tr>
</table>
<div class="description">
<p>
Compare this address with another based on the email address portion only
(any display name and comments are ignored). If the other object is not an
<a href="Address.html">RMail::Address</a>, it is coerced into a string with
its <a href="Address.html#M000119">to_str</a> method and then parsed into
an <a href="Address.html">RMail::Address</a> object.
</p>
</div>
<table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="M000106"></a>
<a href="Address.src/M000106.html" target="Code" class="methodtitle"
onClick="popCode('Address.src/M000106.html');return false;">
<b>hash</b>()
</a>
</td></tr>
</table>
<div class="description">
<p>
Return a hash value for this address. This is based solely on the email
address portion (any display name and comments are ignored).
</p>
</div>
<table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="M000107"></a>
<a href="Address.src/M000107.html" target="Code" class="methodtitle"
onClick="popCode('Address.src/M000107.html');return false;">
<b>eql?</b>(other)
</a>
</td></tr>
</table>
<div class="description">
<p>
Return true if the two objects are equal. Do this based solely on the email
address portion (any display name and comments are ignored). Fails if the
other object is not an <a href="Address.html">RMail::Address</a> object.
</p>
</div>
<table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="M000108"></a>
<a href="Address.src/M000108.html" target="Code" class="methodtitle"
onClick="popCode('Address.src/M000108.html');return false;">
<b>local</b>()
</a>
</td></tr>
</table>
<div class="description">
<p>
Retrieve the local portion of the mail address. This is the portion that
precedes the <tt>@</tt> sign.
</p>
</div>
<table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="M000109"></a>
<a href="Address.src/M000109.html" target="Code" class="methodtitle"
onClick="popCode('Address.src/M000109.html');return false;">
<b>local=</b>(l)
</a>
</td></tr>
</table>
<div class="description">
<p>
Assign the local portion of the mail address. This is the portion that
precedes the <tt>@</tt> sign.
</p>
</div>
<table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="M000110"></a>
<a href="Address.src/M000110.html" target="Code" class="methodtitle"
onClick="popCode('Address.src/M000110.html');return false;">
<b>display_name</b>()
</a>
</td></tr>
</table>
<div class="description">
<p>
Returns the display name of this address. The display name is present only
for "angle addr" style addresses such as:
</p>
<pre>
John Doe <johnd@example.net>
</pre>
<p>
In this case, the display name will be "John Doe". In particular
this old style address has no display name:
</p>
<pre>
bobs@example.net (Bob Smith)
</pre>
<p>
See also <a href="Address.html#M000111">display_name=</a>, <a
href="Address.html#M000112">#name</a>
</p>
</div>
<table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="M000111"></a>
<a href="Address.src/M000111.html" target="Code" class="methodtitle"
onClick="popCode('Address.src/M000111.html');return false;">
<b>display_name=</b>(str)
</a>
</td></tr>
</table>
<div class="description">
<p>
Assign a display name to this address. See <a
href="Address.html#M000110">display_name</a> for a definition of what this
is.
</p>
<p>
See also <a href="Address.html#M000110">display_name</a>
</p>
</div>
<table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="M000112"></a>
<a href="Address.src/M000112.html" target="Code" class="methodtitle"
onClick="popCode('Address.src/M000112.html');return false;">
<b>name</b>()
</a>
</td></tr>
</table>
<div class="description">
<p>
Returns a best guess at a display name for this email address. This
function first checks if the address has a true display name (see <a
href="Address.html#M000110">display_name</a>) and returns it if so.
Otherwise, if the address has any comments, the last comment will be
returned.
</p>
<p>
In most cases, this will behave reasonably. For example, it will return
"Bob Smith" for this address:
</p>
<pre>
bobs@example.net (Bob Smith)
</pre>
<p>
See also <a href="Address.html#M000110">display_name</a>, <a
href="Address.html#M000113">#comments</a>, <a
href="Address.html#M000114">#comments=</a>
</p>
</div>
<table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="M000113"></a>
<a href="Address.src/M000113.html" target="Code" class="methodtitle"
onClick="popCode('Address.src/M000113.html');return false;">
<b>comments</b>()
</a>
</td></tr>
</table>
<div class="description">
<p>
Returns the comments in this address as an array of strings.
</p>
</div>
<table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="M000114"></a>
<a href="Address.src/M000114.html" target="Code" class="methodtitle"
onClick="popCode('Address.src/M000114.html');return false;">
<b>comments=</b>(comments)
</a>
</td></tr>
</table>
<div class="description">
<p>
Set the comments for this address. The <tt>comments</tt> argument can be a
string, or an array of strings. In either case, any existing comments are
replaced.
</p>
<p>
See also <a href="Address.html#M000113">#comments</a>, <a
href="Address.html#M000112">#name</a>
</p>
</div>
<table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="M000115"></a>
<a href="Address.src/M000115.html" target="Code" class="methodtitle"
onClick="popCode('Address.src/M000115.html');return false;">
<b>domain</b>()
</a>
</td></tr>
</table>
<div class="description">
<p>
Retrieve to the domain portion of the mail address. This is the portion
after the <tt>@</tt> sign.
</p>
</div>
<table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="M000116"></a>
<a href="Address.src/M000116.html" target="Code" class="methodtitle"
onClick="popCode('Address.src/M000116.html');return false;">
<b>domain=</b>(domain)
</a>
</td></tr>
</table>
<div class="description">
<p>
Assign a domain name to this address. This is the portion after the
<tt>@</tt> sign. Any existing domain name will be changed.
</p>
</div>
<table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="M000117"></a>
<a href="Address.src/M000117.html" target="Code" class="methodtitle"
onClick="popCode('Address.src/M000117.html');return false;">
<b>address</b>()
</a>
</td></tr>
</table>
<div class="description">
<p>
Returns the email address portion of the address (i.e. without a display
name, angle addresses, or comments).
</p>
<p>
The string returned is not suitable for insertion into an e-mail. RFC2822
quoting rules are not followed. The raw address is returned instead.
</p>
<p>
For example, if the local part requires quoting, this function will not
perform the quoting (see <a href="Address/List.html#M000128">#format</a>
for that). So this function can returns strings such as:
</p>
<pre>
"address with no quoting@example.net"
</pre>
<p>
See also <a href="Address/List.html#M000128">#format</a>
</p>
</div>
<table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="M000118"></a>
<a href="Address.src/M000118.html" target="Code" class="methodtitle"
onClick="popCode('Address.src/M000118.html');return false;">
<b>format</b>()
</a>
</td></tr>
</table>
<div class="description">
<p>
Return this address as a String formated as appropriate for insertion into
a mail message.
</p>
</div>
<div class="aka">
This method is also aliased as
<a href="Address.html#M000119">to_str</a>
</div>
<table summary="method" width="100%" cellspacing="0" cellpadding="5" border="0">
<tr><td class="methodtitle">
<a name="M000119"></a>
<b>to_str</b>()
</td></tr>
</table>
<div class="description">
<p>
Alias for <a href="Address/List.html#M000128">#format</a>
</p>
</div>
</body>
</html>
|