doc/Dynamoid/Document.html in dynamoid-0.4.0 vs doc/Dynamoid/Document.html in dynamoid-0.4.1

- old
+ new

@@ -154,10 +154,54 @@ <li class="public "> <span class="summary_signature"> + <a href="#hash_key-instance_method" title="#hash_key (instance method)">- (Object) <strong>hash_key</strong> </a> + + + + </span> + + + + + + + + + <span class="summary_desc"><div class='inline'><p>Return an object's hash key, regardless of what it might be called to the object.</p> +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + + <a href="#hash_key%3D-instance_method" title="#hash_key= (instance method)">- (Object) <strong>hash_key=</strong>(key) </a> + + + + </span> + + + + + + + + + <span class="summary_desc"><div class='inline'><p>Assign an object's hash key, regardless of what it might be called to the object.</p> +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + <a href="#initialize-instance_method" title="#initialize (instance method)">- (Dynamoid::Document) <strong>initialize</strong>(attrs = {}) </a> </span> @@ -277,10 +321,12 @@ + + <div id="instance_method_details" class="method_details_list"> <h2>Instance Method Details</h2> @@ -320,28 +366,134 @@ <tr> <td> <pre class="lines"> -89 -90 -91 -92</pre> +118 +119 +120 +121</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line 89</span> + <pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line 118</span> <span class='kw'>def</span> <span class='op'>==</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span> <span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>if</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> - <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:id</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span> <span class='op'>==</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span> + <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:hash_key</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_hash_key'>hash_key</span> <span class='op'>==</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_hash_key'>hash_key</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> + <p class="signature " id="hash_key-instance_method"> + + - (<tt>Object</tt>) <strong>hash_key</strong> + + + +</p><div class="docstring"> + <div class="discussion"> + <p>Return an object's hash key, regardless of what it might be called to the object.</p> + + + </div> +</div> +<div class="tags"> + +<h3>Since:</h3> +<ul class="since"> + + <li> + + + + + + <div class='inline'><p>0.4.0</p> +</div> + + </li> + +</ul> + +</div><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +138 +139 +140</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line 138</span> + +<span class='kw'>def</span> <span class='id identifier rubyid_hash_key'>hash_key</span> + <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_hash_key'>hash_key</span><span class='rparen'>)</span> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <p class="signature " id="hash_key=-instance_method"> + + - (<tt>Object</tt>) <strong>hash_key=</strong>(key) + + + +</p><div class="docstring"> + <div class="discussion"> + <p>Assign an object's hash key, regardless of what it might be called to the object.</p> + + + </div> +</div> +<div class="tags"> + +<h3>Since:</h3> +<ul class="since"> + + <li> + + + + + + <div class='inline'><p>0.4.0</p> +</div> + + </li> + +</ul> + +</div><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +145 +146 +147</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line 145</span> + +<span class='kw'>def</span> <span class='id identifier rubyid_hash_key='>hash_key=</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> + <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_hash_key'>hash_key</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>&quot;</span></span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> <p class="signature " id="initialize-instance_method"> - (<tt><span class='object_link'><a href="" title="Dynamoid::Document (module)">Dynamoid::Document</a></span></tt>) <strong>initialize</strong>(attrs = {}) @@ -396,31 +548,31 @@ <tr> <td> <pre class="lines"> -76 -77 -78 -79 -80 -81 -82 -83 -84</pre> +105 +106 +107 +108 +109 +110 +111 +112 +113</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line 76</span> + <pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line 105</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_attrs'>attrs</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span> + <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='symbol'>:field</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_hash_key'>hash_key</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_hash_key'>hash_key</span><span class='rparen'>)</span> + <span class='ivar'>@new_record</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='ivar'>@attributes</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> - <span class='id identifier rubyid_incoming_attributes'>incoming_attributes</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_undump'>undump</span><span class='lparen'>(</span><span class='id identifier rubyid_attrs'>attrs</span><span class='rparen'>)</span> + <span class='ivar'>@associations</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> - <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_attributes'>attributes</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_attribute'>attribute</span><span class='op'>|</span> - <span class='id identifier rubyid_send'>send</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attribute'>attribute</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_incoming_attributes'>incoming_attributes</span><span class='lbracket'>[</span><span class='id identifier rubyid_attribute'>attribute</span><span class='rbracket'>]</span> - <span class='kw'>end</span> + <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_undump'>undump</span><span class='lparen'>(</span><span class='id identifier rubyid_attrs'>attrs</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span> <span class='id identifier rubyid_send'>send</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span> <span class='rbrace'>}</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> @@ -479,20 +631,22 @@ <tr> <td> <pre class="lines"> -100 -101 -102 -103</pre> +129 +130 +131 +132 +133</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line 100</span> + <pre class="code"><span class="info file"># File 'lib/dynamoid/document.rb', line 129</span> <span class='kw'>def</span> <span class='id identifier rubyid_reload'>reload</span> - <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_attributes'>attributes</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_attributes'>attributes</span> + <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_attributes'>attributes</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_hash_key'>hash_key</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_attributes'>attributes</span> + <span class='ivar'>@associations</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:reset</span><span class='rparen'>)</span> <span class='kw'>self</span> <span class='kw'>end</span></pre> </td> </tr> </table> @@ -501,10 +655,10 @@ </div> </div> <div id="footer"> - Generated on Tue Mar 27 17:53:06 2012 by + Generated on Thu Apr 26 01:26:24 2012 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.7.5 (ruby-1.9.3). </div> </body> \ No newline at end of file