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

540 lines
No EOL
16 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: Like
&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 (L)</a> &raquo;
<span class="title">Like</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: Like
</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">Like</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/Socketable.html" title="Diaspora::Socketable (module)">Diaspora::Socketable</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/like.rb</dd>
</dl>
<div class="clear"></div>
<h2>Overview</h2><div class="docstring">
<div class="discussion">
<p>
Copyright &#169; 2010, Diaspora Inc. This file is
</p>
<pre class="code">
<span class='licensed identifier id'>licensed</span> <span class='under identifier id'>under</span> <span class='the identifier id'>the</span> <span class='Affero constant id'>Affero</span> <span class='General constant id'>General</span> <span class='Public constant id'>Public</span> <span class='License constant id'>License</span> <span class='version identifier id'>version</span> <span class='integer val'>3</span> <span class='or or kw'>or</span> <span class='later identifier id'>later</span><span class='dot token'>.</span> <span class='See constant id'>See</span>
<span class='the identifier id'>the</span> <span class='COPYRIGHT constant id'>COPYRIGHT</span> <span class='file identifier id'>file</span><span class='dot token'>.</span>
</pre>
</div>
</div>
<div class="tags">
</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="#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/Socketable.html" title="Diaspora::Socketable (module)">Diaspora::Socketable</a></span></h3>
<p class="inherited"><span class='object_link'><a href="Diaspora/Socketable.html#socket_to_user-instance_method" title="Diaspora::Socketable#socket_to_user (method)">#socket_to_user</a></span>, <span class='object_link'><a href="Diaspora/Socketable.html#unsocket_from_user-instance_method" title="Diaspora::Socketable#unsocket_from_user (method)">#unsocket_from_user</a></span></p>
<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#after_receive-instance_method" title="Diaspora::Relayable#after_receive (method)">#after_receive</a></span>, <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/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>
<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>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<p class="signature first" id="diaspora_handle-instance_method">
- (<tt>Object</tt>) <strong>diaspora_handle</strong>
</p><table class="source_code">
<tr>
<td>
<pre class="lines">
24
25
26</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'app/models/like.rb', line 24</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">
28
29
30</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'app/models/like.rb', line 28</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">
44
45
46</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'app/models/like.rb', line 44</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='Liked constant id'>Liked</span> <span class='if if_mod kw'>if</span> <span class='self self kw'>self</span><span class='dot token'>.</span><span class='post identifier id'>post</span><span class='dot token'>.</span><span class='author identifier id'>author</span> <span class='eq op'>==</span> <span class='user identifier id'>user</span><span class='dot token'>.</span><span class='person identifier id'>person</span> <span class='andop op'>&amp;&amp;</span> <span class='user identifier id'>user</span><span class='dot token'>.</span><span class='person identifier id'>person</span> <span class='neq 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">
36
37
38</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'app/models/like.rb', line 36</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='post identifier id'>post</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">
40
41
42</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'app/models/like.rb', line 40</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='post identifier id'>post</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">
32
33
34</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'app/models/like.rb', line 32</span>
<span class='def def kw'>def</span> <span class='parent_class identifier id'>parent_class</span>
<span class='Post constant id'>Post</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:19 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>