doc/Ballast/Concerns/View.html in ballast-1.6.0 vs doc/Ballast/Concerns/View.html in ballast-1.7.0
- old
+ new
@@ -202,10 +202,35 @@
<li class="public ">
<span class="summary_signature">
+ <a href="#layout_params-instance_method" title="#layout_params (instance method)">- (Object|Hash) <strong>layout_params</strong>(key = nil, default_value = nil) </a>
+
+
+
+ (also: #layout_param)
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'><p>Returns one or all layout parameters.</p>
+</div></span>
+
+</li>
+
+
+ <li class="public ">
+ <span class="summary_signature">
+
<a href="#scope_css-instance_method" title="#scope_css (instance method)">- (String) <strong>scope_css</strong> </a>
</span>
@@ -222,10 +247,33 @@
</div></span>
</li>
+ <li class="public ">
+ <span class="summary_signature">
+
+ <a href="#set_layout_params-instance_method" title="#set_layout_params (instance method)">- (Object) <strong>set_layout_params</strong>(**args) </a>
+
+
+
+ </span>
+
+
+
+
+
+
+
+
+
+ <span class="summary_desc"><div class='inline'><p>Adds/Replaces layout parameters.</p>
+</div></span>
+
+</li>
+
+
</ul>
@@ -307,29 +355,29 @@
<tr>
<td>
<pre class="lines">
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59</pre>
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/ballast/concerns/view.rb', line 47</span>
+ <pre class="code"><span class="info file"># File 'lib/ballast/concerns/view.rb', line 67</span>
<span class='kw'>def</span> <span class='id identifier rubyid_add_javascript_params'>add_javascript_params</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span><span class='comma'>,</span> <span class='id identifier rubyid_replace'>replace</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
- <span class='ivar'>@javascript_params</span> <span class='op'>||=</span> <span class='const'>HashWithIndifferentAccess</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
+ <span class='id identifier rubyid_initialize_view_params'>initialize_view_params</span>
<span class='kw'>if</span> <span class='id identifier rubyid_key'>key</span>
<span class='ivar'>@javascript_params</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_replace'>replace</span>
<span class='ivar'>@javascript_params</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
<span class='ivar'>@javascript_params</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_data'>data</span><span class='rparen'>)</span>
@@ -559,19 +607,122 @@
<tr>
<td>
<pre class="lines">
+57
+58
+59
+60</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/ballast/concerns/view.rb', line 57</span>
+
+<span class='kw'>def</span> <span class='id identifier rubyid_javascript_params'>javascript_params</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_tag'>tag</span> <span class='op'>=</span> <span class='symbol'>:details</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_initialize_view_params'>initialize_view_params</span>
+ <span class='id identifier rubyid_id'>id</span> <span class='op'>?</span> <span class='id identifier rubyid_content_tag'>content_tag</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='comma'>,</span> <span class='ivar'>@javascript_params</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span><span class='period'>.</span><span class='id identifier rubyid_html_safe'>html_safe</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>data-jid</span><span class='tstring_end'>"</span></span> <span class='op'>=></span> <span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span><span class='op'>:</span> <span class='ivar'>@javascript_params</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
+</div>
+
+ <div class="method_details ">
+ <h3 class="signature " id="layout_params-instance_method">
+
+ - (<tt>Object|Hash</tt>) <strong>layout_params</strong>(key = nil, default_value = nil)
+
+
+
+ <span class="aliases">Also known as:
+ <span class="names"><span id='layout_param-instance_method'>layout_param</span></span>
+ </span>
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+ <p>Returns one or all layout parameters.</p>
+
+
+ </div>
+</div>
+<div class="tags">
+ <p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>key</span>
+
+
+ <span class='type'>(<tt>String|Symbol|NilClass</tt>)</span>
+
+
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
+
+
+ —
+ <div class='inline'><p>The parameter to return. If set to <code>nil</code>, all the parameters will be returned as an hash.</p>
+</div>
+
+ </li>
+
+ <li>
+
+ <span class='name'>default_value</span>
+
+
+ <span class='type'>(<tt>Object</tt>)</span>
+
+
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
+
+
+ —
+ <div class='inline'><p>The default value if the parameter is not present.</p>
+</div>
+
+ </li>
+
+</ul>
+
+<p class="tag_title">Returns:</p>
+<ul class="return">
+
+ <li>
+
+
+ <span class='type'>(<tt>Object|Hash</tt>)</span>
+
+
+
+ —
+ <div class='inline'><p>The parameter or the entire layout parameters hash.</p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
38
39
-40</pre>
+40
+41</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'lib/ballast/concerns/view.rb', line 38</span>
-<span class='kw'>def</span> <span class='id identifier rubyid_javascript_params'>javascript_params</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_tag'>tag</span> <span class='op'>=</span> <span class='symbol'>:details</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_id'>id</span> <span class='op'>?</span> <span class='id identifier rubyid_content_tag'>content_tag</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='comma'>,</span> <span class='ivar'>@javascript_params</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span><span class='period'>.</span><span class='id identifier rubyid_html_safe'>html_safe</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>data-jid</span><span class='tstring_end'>"</span></span> <span class='op'>=></span> <span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span><span class='op'>:</span> <span class='ivar'>@javascript_params</span>
+<span class='kw'>def</span> <span class='id identifier rubyid_layout_params'>layout_params</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_default_value'>default_value</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_initialize_view_params'>initialize_view_params</span>
+ <span class='id identifier rubyid_key'>key</span> <span class='op'>?</span> <span class='ivar'>@layout_params</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_default_value'>default_value</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='ivar'>@layout_params</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
@@ -631,15 +782,76 @@
</td>
</tr>
</table>
</div>
+ <div class="method_details ">
+ <h3 class="signature " id="set_layout_params-instance_method">
+
+ - (<tt>Object</tt>) <strong>set_layout_params</strong>(**args)
+
+
+
+
+
+</h3><div class="docstring">
+ <div class="discussion">
+ <p>Adds/Replaces layout parameters.</p>
+
+
</div>
+</div>
+<div class="tags">
+ <p class="tag_title">Parameters:</p>
+<ul class="param">
+
+ <li>
+
+ <span class='name'>args</span>
+
+
+ <span class='type'>(<tt>Hash</tt>)</span>
+
+
+
+ —
+ <div class='inline'><p>The new parameters to add.</p>
+</div>
+
+ </li>
+
+</ul>
+
+</div><table class="source_code">
+ <tr>
+ <td>
+ <pre class="lines">
+
+
+47
+48
+49
+50</pre>
+ </td>
+ <td>
+ <pre class="code"><span class="info file"># File 'lib/ballast/concerns/view.rb', line 47</span>
+
+<span class='kw'>def</span> <span class='id identifier rubyid_set_layout_params'>set_layout_params</span><span class='lparen'>(</span><span class='op'>**</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_initialize_view_params'>initialize_view_params</span>
+ <span class='ivar'>@layout_params</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
+<span class='kw'>end</span></pre>
+ </td>
+ </tr>
+</table>
</div>
+
+ </div>
+</div>
+
<div id="footer">
- Generated on Sat Jan 25 11:54:04 2014 by
+ Generated on Sat Jan 25 13:47:00 2014 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.3 (ruby-2.1.0).
</div>
</body>
\ No newline at end of file