diaspora/doc/Message.html
2011-06-13 16:12:32 -07:00

674 lines
No EOL
20 KiB
HTML

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
Class: Message
&mdash; Documentation by YARD 0.7.1
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
relpath = '';
if (relpath != '') relpath += '/';
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
</head>
<body>
<script type="text/javascript" charset="utf-8">
if (window.top.frames.main) document.body.className = 'frames';
</script>
<div id="header">
<div id="menu">
<a href="_index.html">Index (M)</a> &raquo;
<span class="title">Message</span>
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>
<div id="search">
<a id="class_list_link" href="#">Class List</a>
<a id="method_list_link" href="#">Method List</a>
<a id="file_list_link" href="#">File List</a>
</div>
<div class="clear"></div>
</div>
<iframe id="search_frame"></iframe>
<div id="content"><h1>Class: Message
</h1>
<dl class="box">
<dt class="r1">Inherits:</dt>
<dd class="r1">
<span class="inheritName">ActiveRecord::Base</span>
<ul class="fullTree">
<li>Object</li>
<li class="next">ActiveRecord::Base</li>
<li class="next">Message</li>
</ul>
<a href="#" class="inheritanceTree">show all</a>
</dd>
<dt class="r2">Includes:</dt>
<dd class="r2"><span class='object_link'><a href="Diaspora/Guid.html" title="Diaspora::Guid (module)">Diaspora::Guid</a></span>, <span class='object_link'><a href="Diaspora/Relayable.html" title="Diaspora::Relayable (module)">Diaspora::Relayable</a></span>, <span class='object_link'><a href="Diaspora/Webhooks.html" title="Diaspora::Webhooks (module)">Diaspora::Webhooks</a></span>, ROXML</dd>
<dt class="r1 last">Defined in:</dt>
<dd class="r1 last">app/models/message.rb</dd>
</dl>
<div class="clear"></div>
<h2>
Instance Method Summary
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
</h2>
<ul class="summary">
<li class="public ">
<span class="summary_signature">
<a href="#after_receive-instance_method" title="#after_receive (instance method)">- (Object) <strong>after_receive</strong>(user, person) </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#conversation_guid-instance_method" title="#conversation_guid (instance method)">- (Object) <strong>conversation_guid</strong> </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#conversation_guid%3D-instance_method" title="#conversation_guid= (instance method)">- (Object) <strong>conversation_guid=</strong>(guid) </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#diaspora_handle-instance_method" title="#diaspora_handle (instance method)">- (Object) <strong>diaspora_handle</strong> </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#diaspora_handle%3D-instance_method" title="#diaspora_handle= (instance method)">- (Object) <strong>diaspora_handle=</strong>(nh) </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#notification_type-instance_method" title="#notification_type (instance method)">- (Object) <strong>notification_type</strong>(user, person) </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#parent-instance_method" title="#parent (instance method)">- (Object) <strong>parent</strong> </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#parent%3D-instance_method" title="#parent= (instance method)">- (Object) <strong>parent=</strong>(parent) </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#parent_class-instance_method" title="#parent_class (instance method)">- (Object) <strong>parent_class</strong> </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
</ul>
<h3 class="inherited">Methods included from <span class='object_link'><a href="Diaspora/Relayable.html" title="Diaspora::Relayable (module)">Diaspora::Relayable</a></span></h3>
<p class="inherited"><span class='object_link'><a href="Diaspora/Relayable.html#included-class_method" title="Diaspora::Relayable.included (method)">included</a></span>, <span class='object_link'><a href="Diaspora/Relayable.html#initialize_signatures-instance_method" title="Diaspora::Relayable#initialize_signatures (method)">#initialize_signatures</a></span>, <span class='object_link'><a href="Diaspora/Relayable.html#parent_guid-instance_method" title="Diaspora::Relayable#parent_guid (method)">#parent_guid</a></span>, <span class='object_link'><a href="Diaspora/Relayable.html#parent_guid%3D-instance_method" title="Diaspora::Relayable#parent_guid= (method)">#parent_guid=</a></span>, <span class='object_link'><a href="Diaspora/Relayable.html#receive-instance_method" title="Diaspora::Relayable#receive (method)">#receive</a></span>, <span class='object_link'><a href="Diaspora/Relayable.html#relayable%3F-instance_method" title="Diaspora::Relayable#relayable? (method)">#relayable?</a></span>, <span class='object_link'><a href="Diaspora/Relayable.html#signature_valid%3F-instance_method" title="Diaspora::Relayable#signature_valid? (method)">#signature_valid?</a></span>, <span class='object_link'><a href="Diaspora/Relayable.html#subscribers-instance_method" title="Diaspora::Relayable#subscribers (method)">#subscribers</a></span>, <span class='object_link'><a href="Diaspora/Relayable.html#verify_parent_author_signature-instance_method" title="Diaspora::Relayable#verify_parent_author_signature (method)">#verify_parent_author_signature</a></span></p>
<h3 class="inherited">Methods included from <span class='object_link'><a href="Diaspora/Encryptable.html" title="Diaspora::Encryptable (module)">Diaspora::Encryptable</a></span></h3>
<p class="inherited"><span class='object_link'><a href="Diaspora/Encryptable.html#sign_with_key-instance_method" title="Diaspora::Encryptable#sign_with_key (method)">#sign_with_key</a></span>, <span class='object_link'><a href="Diaspora/Encryptable.html#signable_accessors-instance_method" title="Diaspora::Encryptable#signable_accessors (method)">#signable_accessors</a></span>, <span class='object_link'><a href="Diaspora/Encryptable.html#signable_string-instance_method" title="Diaspora::Encryptable#signable_string (method)">#signable_string</a></span>, <span class='object_link'><a href="Diaspora/Encryptable.html#verify_signature-instance_method" title="Diaspora::Encryptable#verify_signature (method)">#verify_signature</a></span></p>
<h3 class="inherited">Methods included from <span class='object_link'><a href="Diaspora/Webhooks.html" title="Diaspora::Webhooks (module)">Diaspora::Webhooks</a></span></h3>
<p class="inherited"><span class='object_link'><a href="Diaspora/Webhooks.html#receive-instance_method" title="Diaspora::Webhooks#receive (method)">#receive</a></span>, <span class='object_link'><a href="Diaspora/Webhooks.html#subscribers-instance_method" title="Diaspora::Webhooks#subscribers (method)">#subscribers</a></span>, <span class='object_link'><a href="Diaspora/Webhooks.html#to_diaspora_xml-instance_method" title="Diaspora::Webhooks#to_diaspora_xml (method)">#to_diaspora_xml</a></span>, <span class='object_link'><a href="Diaspora/Webhooks.html#x-instance_method" title="Diaspora::Webhooks#x (method)">#x</a></span></p>
<h3 class="inherited">Methods included from <span class='object_link'><a href="Diaspora/Guid.html" title="Diaspora::Guid (module)">Diaspora::Guid</a></span></h3>
<p class="inherited"><span class='object_link'><a href="Diaspora/Guid.html#included-class_method" title="Diaspora::Guid.included (method)">included</a></span>, <span class='object_link'><a href="Diaspora/Guid.html#set_guid-instance_method" title="Diaspora::Guid#set_guid (method)">#set_guid</a></span></p>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<p class="signature first" id="after_receive-instance_method">
- (<tt>Object</tt>) <strong>after_receive</strong>(user, person)
</p><table class="source_code">
<tr>
<td>
<pre class="lines">
60
61
62
63
64
65
66
67
68</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'app/models/message.rb', line 60</span>
<span class='def def kw'>def</span> <span class='after_receive identifier id'>after_receive</span><span class='lparen token'>(</span><span class='user identifier id'>user</span><span class='comma token'>,</span> <span class='person identifier id'>person</span><span class='rparen token'>)</span>
<span class='if if kw'>if</span> <span class='vis identifier id'>vis</span> <span class='assign token'>=</span> <span class='ConversationVisibility constant id'>ConversationVisibility</span><span class='dot token'>.</span><span class='where identifier id'>where</span><span class='lparen token'>(</span><span class='symbol val'>:conversation_id</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='conversation_id identifier id'>conversation_id</span><span class='comma token'>,</span> <span class='symbol val'>:person_id</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='user identifier id'>user</span><span class='dot token'>.</span><span class='person identifier id'>person</span><span class='dot token'>.</span><span class='id identifier id'>id</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='first identifier id'>first</span>
<span class='vis identifier id'>vis</span><span class='dot token'>.</span><span class='unread identifier id'>unread</span> <span class='opasgn op'>+=</span> <span class='integer val'>1</span>
<span class='vis identifier id'>vis</span><span class='dot token'>.</span><span class='save identifier id'>save</span>
<span class='self self kw'>self</span>
<span class='else else kw'>else</span>
<span class='raise identifier id'>raise</span> <span class='NotVisibleException constant id'>NotVisibleException</span><span class='lparen token'>(</span><span class='string val'>&quot;Attempting to access a ConversationVisibility that does not exist!&quot;</span><span class='rparen token'>)</span>
<span class='end end kw'>end</span>
<span class='end end kw'>end</span>
</pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<p class="signature " id="conversation_guid-instance_method">
- (<tt>Object</tt>) <strong>conversation_guid</strong>
</p><table class="source_code">
<tr>
<td>
<pre class="lines">
38
39
40</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'app/models/message.rb', line 38</span>
<span class='def def kw'>def</span> <span class='conversation_guid identifier id'>conversation_guid</span>
<span class='self self kw'>self</span><span class='dot token'>.</span><span class='conversation identifier id'>conversation</span><span class='dot token'>.</span><span class='guid identifier id'>guid</span>
<span class='end end kw'>end</span>
</pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<p class="signature " id="conversation_guid=-instance_method">
- (<tt>Object</tt>) <strong>conversation_guid=</strong>(guid)
</p><table class="source_code">
<tr>
<td>
<pre class="lines">
42
43
44
45
46</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'app/models/message.rb', line 42</span>
<span class='def def kw'>def</span> <span class='conversation_guid= identifier id'>conversation_guid=</span> <span class='guid identifier id'>guid</span>
<span class='if if kw'>if</span> <span class='cnv identifier id'>cnv</span> <span class='assign token'>=</span> <span class='Conversation constant id'>Conversation</span><span class='dot token'>.</span><span class='find_by_guid identifier id'>find_by_guid</span><span class='lparen token'>(</span><span class='guid identifier id'>guid</span><span class='rparen token'>)</span>
<span class='self self kw'>self</span><span class='dot token'>.</span><span class='conversation_id identifier id'>conversation_id</span> <span class='assign token'>=</span> <span class='cnv identifier id'>cnv</span><span class='dot token'>.</span><span class='id identifier id'>id</span>
<span class='end end kw'>end</span>
<span class='end end kw'>end</span>
</pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<p class="signature " id="diaspora_handle-instance_method">
- (<tt>Object</tt>) <strong>diaspora_handle</strong>
</p><table class="source_code">
<tr>
<td>
<pre class="lines">
30
31
32</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'app/models/message.rb', line 30</span>
<span class='def def kw'>def</span> <span class='diaspora_handle identifier id'>diaspora_handle</span>
<span class='self self kw'>self</span><span class='dot token'>.</span><span class='author identifier id'>author</span><span class='dot token'>.</span><span class='diaspora_handle identifier id'>diaspora_handle</span>
<span class='end end kw'>end</span>
</pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<p class="signature " id="diaspora_handle=-instance_method">
- (<tt>Object</tt>) <strong>diaspora_handle=</strong>(nh)
</p><table class="source_code">
<tr>
<td>
<pre class="lines">
34
35
36</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'app/models/message.rb', line 34</span>
<span class='def def kw'>def</span> <span class='diaspora_handle= identifier id'>diaspora_handle=</span> <span class='nh identifier id'>nh</span>
<span class='self self kw'>self</span><span class='dot token'>.</span><span class='author identifier id'>author</span> <span class='assign token'>=</span> <span class='Webfinger constant id'>Webfinger</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='nh identifier id'>nh</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='fetch identifier id'>fetch</span>
<span class='end end kw'>end</span>
</pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<p class="signature " id="notification_type-instance_method">
- (<tt>Object</tt>) <strong>notification_type</strong>(user, person)
</p><table class="source_code">
<tr>
<td>
<pre class="lines">
70
71
72</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'app/models/message.rb', line 70</span>
<span class='def def kw'>def</span> <span class='notification_type identifier id'>notification_type</span><span class='lparen token'>(</span><span class='user identifier id'>user</span><span class='comma token'>,</span> <span class='person identifier id'>person</span><span class='rparen token'>)</span>
<span class='Notifications constant id'>Notifications</span><span class='colon2 op'>::</span><span class='PrivateMessage constant id'>PrivateMessage</span> <span class='unless unless_mod kw'>unless</span> <span class='user identifier id'>user</span><span class='dot token'>.</span><span class='person identifier id'>person</span> <span class='eq op'>==</span> <span class='person identifier id'>person</span>
<span class='end end kw'>end</span>
</pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<p class="signature " id="parent-instance_method">
- (<tt>Object</tt>) <strong>parent</strong>
</p><table class="source_code">
<tr>
<td>
<pre class="lines">
52
53
54</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'app/models/message.rb', line 52</span>
<span class='def def kw'>def</span> <span class='parent identifier id'>parent</span>
<span class='self self kw'>self</span><span class='dot token'>.</span><span class='conversation identifier id'>conversation</span>
<span class='end end kw'>end</span>
</pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<p class="signature " id="parent=-instance_method">
- (<tt>Object</tt>) <strong>parent=</strong>(parent)
</p><table class="source_code">
<tr>
<td>
<pre class="lines">
56
57
58</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'app/models/message.rb', line 56</span>
<span class='def def kw'>def</span> <span class='parent= identifier id'>parent=</span> <span class='parent identifier id'>parent</span>
<span class='self self kw'>self</span><span class='dot token'>.</span><span class='conversation identifier id'>conversation</span> <span class='assign token'>=</span> <span class='parent identifier id'>parent</span>
<span class='end end kw'>end</span>
</pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<p class="signature " id="parent_class-instance_method">
- (<tt>Object</tt>) <strong>parent_class</strong>
</p><table class="source_code">
<tr>
<td>
<pre class="lines">
48
49
50</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'app/models/message.rb', line 48</span>
<span class='def def kw'>def</span> <span class='parent_class identifier id'>parent_class</span>
<span class='Conversation constant id'>Conversation</span>
<span class='end end kw'>end</span>
</pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Mon Jun 13 15:59:18 2011 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.7.1 (ruby-1.8.7).
</div>
</body>
</html>