<!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: HelixSync::Methods::Subplan
— Documentation by YARD 0.8.7.6
</title>
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
hasFrames = window.top.frames.main ? true : false;
relpath = '../../';
framesUrl = "../../frames.html#!HelixSync/Methods/Subplan.html";
</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>
<div id="header">
<div id="menu">
<a href="../../_index.html">Index (S)</a> »
<span class='title'><span class='object_link'><a href="../../HelixSync.html" title="HelixSync (module)">HelixSync</a></span></span> » <span class='title'><span class='object_link'><a href="../Methods.html" title="HelixSync::Methods (module)">Methods</a></span></span>
»
<span class="title">Subplan</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 class="full_list_link" id="class_list_link"
href="../../class_list.html">
Class List
</a>
<a class="full_list_link" id="method_list_link"
href="../../method_list.html">
Method List
</a>
<a class="full_list_link" id="file_list_link"
href="../../file_list.html">
File List
</a>
</div>
<div class="clear"></div>
</div>
<iframe id="search_frame"></iframe>
<div id="content"><h1>Class: HelixSync::Methods::Subplan
</h1>
<dl class="box">
<dt class="r1">Inherits:</dt>
<dd class="r1">
<span class="inheritName">OpenStruct</span>
<ul class="fullTree">
<li>Object</li>
<li class="next">OpenStruct</li>
<li class="next">HelixSync::Methods::Subplan</li>
</ul>
<a href="#" class="inheritanceTree">show all</a>
</dd>
<dt class="r2 last">Defined in:</dt>
<dd class="r2 last">lib/helix_sync/methods.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="#head_delete%3F-instance_method" title="#head_delete? (instance method)">- (Boolean) <strong>head_delete?</strong> </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#locked_by_other_than%3F-instance_method" title="#locked_by_other_than? (instance method)">- (Boolean) <strong>locked_by_other_than?</strong>(user) </a>
</span>
<span class="summary_desc"><div class='inline'>
<p>Returns true if the subplan contains an “otherLock” that is <em>not</em>
the indicated user.</p>
</div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#sync_conflict-instance_method" title="#sync_conflict (instance method)">- (Object) <strong>sync_conflict</strong> </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
<li class="public ">
<span class="summary_signature">
<a href="#to_json-instance_method" title="#to_json (instance method)">- (Object) <strong>to_json</strong>(*a) </a>
</span>
<span class="summary_desc"><div class='inline'></div></span>
</li>
</ul>
<div id="instance_method_details" class="method_details_list">
<h2>Instance Method Details</h2>
<div class="method_details first">
<h3 class="signature first" id="head_delete?-instance_method">
- (<tt>Boolean</tt>) <strong>head_delete?</strong>
</h3><div class="docstring">
<div class="discussion">
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
561
562
563</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/helix_sync/methods.rb', line 561</span>
<span class='kw'>def</span> <span class='id identifier rubyid_head_delete?'>head_delete?</span>
<span class='qwords_beg'>%w(</span><span class='tstring_content'>delete</span><span class='words_sep'> </span><span class='tstring_content'>move/delete</span><span class='words_sep'>)</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_headAction'>headAction</span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="locked_by_other_than?-instance_method">
- (<tt>Boolean</tt>) <strong>locked_by_other_than?</strong>(user)
</h3><div class="docstring">
<div class="discussion">
<p>Returns true if the subplan contains an “otherLock” that is <em>not</em>
the indicated user</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Returns:</p>
<ul class="return">
<li>
<span class='type'>(<tt>Boolean</tt>)</span>
</li>
</ul>
</div><table class="source_code">
<tr>
<td>
<pre class="lines">
555
556
557
558
559</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/helix_sync/methods.rb', line 555</span>
<span class='kw'>def</span> <span class='id identifier rubyid_locked_by_other_than?'>locked_by_other_than?</span><span class='lparen'>(</span><span class='id identifier rubyid_user'>user</span><span class='rparen'>)</span>
<span class='op'>!</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_otherLock'>otherLock</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>&&</span>
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_otherLock'>otherLock</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span> <span class='op'>&&</span>
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_otherLock'>otherLock</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span><span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_l'>l</span><span class='op'>|</span> <span class='id identifier rubyid_l'>l</span><span class='period'>.</span><span class='id identifier rubyid_start_with?'>start_with?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_user'>user</span><span class='embexpr_end'>}</span><span class='tstring_content'>@</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='rbrace'>}</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="sync_conflict-instance_method">
- (<tt>Object</tt>) <strong>sync_conflict</strong>
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
565
566
567
568
569
570
571
572
573</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/helix_sync/methods.rb', line 565</span>
<span class='kw'>def</span> <span class='id identifier rubyid_sync_conflict'>sync_conflict</span>
<span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_action'>action</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>delete</span><span class='tstring_end'>'</span></span>
<span class='id identifier rubyid_head_delete?'>head_delete?</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>remove</span><span class='tstring_end'>'</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>resolve</span><span class='tstring_end'>'</span></span>
<span class='kw'>elsif</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_action'>action</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>add</span><span class='tstring_end'>'</span></span> <span class='op'>||</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_action'>action</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>edit</span><span class='tstring_end'>'</span></span>
<span class='id identifier rubyid_head_delete?'>head_delete?</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>readd</span><span class='tstring_end'>'</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>resolve</span><span class='tstring_end'>'</span></span>
<span class='kw'>else</span>
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>unknown</span><span class='tstring_end'>'</span></span>
<span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
<div class="method_details ">
<h3 class="signature " id="to_json-instance_method">
- (<tt>Object</tt>) <strong>to_json</strong>(*a)
</h3><table class="source_code">
<tr>
<td>
<pre class="lines">
575
576
577</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/helix_sync/methods.rb', line 575</span>
<span class='kw'>def</span> <span class='id identifier rubyid_to_json'>to_json</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_a'>a</span><span class='rparen'>)</span>
<span class='id identifier rubyid_to_h'>to_h</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
Generated on Mon Oct 12 22:20:52 2015 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.2.3).
</div>
</body>
</html>