docs/Triglav/Agent/StorageFile.html in triglav-agent-1.0.0.rc3 vs docs/Triglav/Agent/StorageFile.html in triglav-agent-1.0.0

- old
+ new

@@ -241,10 +241,34 @@ <li class="public "> <span class="summary_signature"> + <a href="#merge%21-class_method" title="merge! (class method)">.<strong>merge!</strong>(path, key, val) &#x21d2; Object </a> + + + + </span> + + + + + + + + + + <span class="summary_desc"><div class='inline'> +<p>Merge Hash value with existing Hash value.</p> +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + <a href="#open-class_method" title="open (class method)">.<strong>open</strong>(path, &amp;block) &#x21d2; Object </a> </span> @@ -265,10 +289,34 @@ <li class="public "> <span class="summary_signature"> + <a href="#readopen-class_method" title="readopen (class method)">.<strong>readopen</strong>(path, &amp;block) &#x21d2; Object </a> + + + + </span> + + + + + + + + + + <span class="summary_desc"><div class='inline'> +<p>Open storage file to read.</p> +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + <a href="#select%21-class_method" title="select! (class method)">.<strong>select!</strong>(path, parents = [], keys) &#x21d2; Object </a> </span> @@ -504,21 +552,21 @@ <tr> <td> <pre class="lines"> -122 -123 -124 -125</pre> +175 +176 +177 +178</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/triglav/agent/storage_file.rb', line 122</span> + <pre class="code"><span class="info file"># File 'lib/triglav/agent/storage_file.rb', line 175</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get'>get</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> <span class='id identifier rubyid_keys'>keys</span> <span class='op'>=</span> <span class='const'>Array</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> - <span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_fp'>fp</span><span class='op'>|</span> <span class='id identifier rubyid_fp'>fp</span><span class='period'>.</span><span class='id identifier rubyid_load'>load</span><span class='period'>.</span><span class='id identifier rubyid_dig'>dig</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_keys'>keys</span><span class='rparen'>)</span> <span class='rbrace'>}</span> + <span class='id identifier rubyid_readopen'>readopen</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_fp'>fp</span><span class='op'>|</span> <span class='id identifier rubyid_fp'>fp</span><span class='period'>.</span><span class='id identifier rubyid_load'>load</span><span class='period'>.</span><span class='id identifier rubyid_dig'>dig</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_keys'>keys</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> @@ -608,25 +656,25 @@ <tr> <td> <pre class="lines"> -102 -103 -104 -105 -106 -107 -108 -109 -110 -111 -112 -113</pre> +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/triglav/agent/storage_file.rb', line 102</span> + <pre class="code"><span class="info file"># File 'lib/triglav/agent/storage_file.rb', line 155</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_getsetnx'>getsetnx</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_val'>val</span><span class='rparen'>)</span> <span class='id identifier rubyid_keys'>keys</span> <span class='op'>=</span> <span class='const'>Array</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> <span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_fp'>fp</span><span class='op'>|</span> <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='id identifier rubyid_fp'>fp</span><span class='period'>.</span><span class='id identifier rubyid_load'>load</span> @@ -698,26 +746,138 @@ <tr> <td> <pre class="lines"> -26 -27 -28</pre> +44 +45 +46</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/triglav/agent/storage_file.rb', line 26</span> + <pre class="code"><span class="info file"># File 'lib/triglav/agent/storage_file.rb', line 44</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load'>load</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_fp'>fp</span><span class='op'>|</span> <span class='id identifier rubyid_fp'>fp</span><span class='period'>.</span><span class='id identifier rubyid_load'>load</span> <span class='rbrace'>}</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> + <h3 class="signature " id="merge!-class_method"> + + .<strong>merge!</strong>(path, key, val) &#x21d2; <tt>Object</tt> + + + + + +</h3><div class="docstring"> + <div class="discussion"> + +<p>Merge Hash value with existing Hash value.</p> + + + </div> +</div> +<div class="tags"> + <p class="tag_title">Parameters:</p> +<ul class="param"> + + <li> + + <span class='name'>path</span> + + + <span class='type'>(<tt>String</tt>)</span> + + + + </li> + + <li> + + <span class='name'>key</span> + + + <span class='type'>(<tt>Object</tt>)</span> + + + + </li> + + <li> + + <span class='name'>val</span> + + + <span class='type'>(<tt>Hash</tt>)</span> + + + + </li> + +</ul> + +<p class="tag_title">Returns:</p> +<ul class="return"> + + <li> + + + <span class='type'>(<tt>Object</tt>)</span> + + + + &mdash; + <div class='inline'> +<p>holded value</p> +</div> + + </li> + +</ul> + +</div><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/triglav/agent/storage_file.rb', line 112</span> + +<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_val'>val</span><span class='rparen'>)</span> + <span class='id identifier rubyid_keys'>keys</span> <span class='op'>=</span> <span class='const'>Array</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> + <span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_fp'>fp</span><span class='op'>|</span> + <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='id identifier rubyid_fp'>fp</span><span class='period'>.</span><span class='id identifier rubyid_load'>load</span> + <span class='id identifier rubyid__val'>_val</span> <span class='op'>=</span> <span class='id identifier rubyid_params'>params</span><span class='period'>.</span><span class='id identifier rubyid_dig'>dig</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_keys'>keys</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> + <span class='id identifier rubyid__val'>_val</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='id identifier rubyid_val'>val</span><span class='rparen'>)</span> + <span class='const'>HashUtil</span><span class='period'>.</span><span class='id identifier rubyid_setdig'>setdig</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='comma'>,</span> <span class='id identifier rubyid_keys'>keys</span><span class='comma'>,</span> <span class='id identifier rubyid__val'>_val</span><span class='rparen'>)</span> + <span class='id identifier rubyid_fp'>fp</span><span class='period'>.</span><span class='id identifier rubyid_dump'>dump</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span> + <span class='kw'>return</span> <span class='kw'>true</span> + <span class='kw'>end</span> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> <h3 class="signature " id="open-class_method"> .<strong>open</strong>(path, &amp;block) &#x21d2; <tt>Object</tt> @@ -772,33 +932,115 @@ <tr> <td> <pre class="lines"> -40 -41 -42 -43 -44 -45 -46 -47 -48 -49 -50 -51 -52</pre> +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/triglav/agent/storage_file.rb', line 40</span> + <pre class="code"><span class="info file"># File 'lib/triglav/agent/storage_file.rb', line 58</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span> - <span class='id identifier rubyid_fp'>fp</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='lparen'>(</span><span class='const'>File</span><span class='op'>::</span><span class='const'>RDONLY</span> <span class='op'>|</span> <span class='const'>File</span><span class='op'>::</span><span class='const'>CREAT</span><span class='rparen'>)</span><span class='rparen'>)</span> - <span class='kw'>until</span> <span class='id identifier rubyid_fp'>fp</span><span class='period'>.</span><span class='id identifier rubyid_flock'>flock</span><span class='lparen'>(</span><span class='const'>File</span><span class='op'>::</span><span class='const'>LOCK_EX</span> <span class='op'>|</span> <span class='const'>File</span><span class='op'>::</span><span class='const'>LOCK_NB</span><span class='rparen'>)</span> - <span class='gvar'>$logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Somebody else is locking the storage file </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span> - <span class='id identifier rubyid_sleep'>sleep</span> <span class='float'>0.5</span> + <span class='comment'># Use RDONLY instead of WRONLY not to TRUNCate contents +</span> <span class='id identifier rubyid_fp'>fp</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='lparen'>(</span><span class='const'>File</span><span class='op'>::</span><span class='const'>RDONLY</span> <span class='op'>|</span> <span class='const'>File</span><span class='op'>::</span><span class='const'>CREAT</span><span class='rparen'>)</span><span class='rparen'>)</span> + <span class='id identifier rubyid_fp'>fp</span><span class='period'>.</span><span class='id identifier rubyid_flock'>flock</span><span class='lparen'>(</span><span class='const'>File</span><span class='op'>::</span><span class='const'>LOCK_EX</span><span class='rparen'>)</span> + <span class='kw'>begin</span> + <span class='kw'>return</span> <span class='kw'>yield</span><span class='lparen'>(</span><span class='const'>StorageFile</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_fp'>fp</span><span class='rparen'>)</span><span class='rparen'>)</span> + <span class='kw'>ensure</span> + <span class='id identifier rubyid_fp'>fp</span><span class='period'>.</span><span class='id identifier rubyid_flock'>flock</span><span class='lparen'>(</span><span class='const'>File</span><span class='op'>::</span><span class='const'>LOCK_UN</span><span class='rparen'>)</span> + <span class='id identifier rubyid_fp'>fp</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span> <span class='kw'>rescue</span> <span class='kw'>nil</span> <span class='kw'>end</span> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> + <h3 class="signature " id="readopen-class_method"> + + .<strong>readopen</strong>(path, &amp;block) &#x21d2; <tt>Object</tt> + + + + + +</h3><div class="docstring"> + <div class="discussion"> + +<p>Open storage file to read</p> + +<pre class="code ruby"><code class="ruby"><span class='const'>StorageFile</span><span class='period'>.</span><span class='id identifier rubyid_readopen'>readopen</span><span class='lparen'>(</span><span class='gvar'>$setting</span><span class='period'>.</span><span class='id identifier rubyid_status_file'>status_file</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_fp'>fp</span><span class='op'>|</span> + <span class='id identifier rubyid_status'>status</span> <span class='op'>=</span> <span class='id identifier rubyid_fp'>fp</span><span class='period'>.</span><span class='id identifier rubyid_load'>load</span> +<span class='kw'>end</span> +</code></pre> + + + </div> +</div> +<div class="tags"> + <p class="tag_title">Parameters:</p> +<ul class="param"> + + <li> + + <span class='name'>path</span> + + + <span class='type'>(<tt>String</tt>)</span> + + + + </li> + + <li> + + <span class='name'>block</span> + + + <span class='type'>(<tt>Block</tt>)</span> + + + + </li> + +</ul> + + +</div><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +78 +79 +80 +81 +82 +83 +84 +85 +86 +87</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/triglav/agent/storage_file.rb', line 78</span> + +<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_readopen'>readopen</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span> + <span class='id identifier rubyid_fp'>fp</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='lparen'>(</span><span class='const'>File</span><span class='op'>::</span><span class='const'>RDONLY</span> <span class='op'>|</span> <span class='const'>File</span><span class='op'>::</span><span class='const'>CREAT</span><span class='rparen'>)</span><span class='rparen'>)</span> + <span class='id identifier rubyid_fp'>fp</span><span class='period'>.</span><span class='id identifier rubyid_flock'>flock</span><span class='lparen'>(</span><span class='const'>File</span><span class='op'>::</span><span class='const'>LOCK_SH</span><span class='rparen'>)</span> <span class='kw'>begin</span> <span class='kw'>return</span> <span class='kw'>yield</span><span class='lparen'>(</span><span class='const'>StorageFile</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_fp'>fp</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>ensure</span> <span class='id identifier rubyid_fp'>fp</span><span class='period'>.</span><span class='id identifier rubyid_flock'>flock</span><span class='lparen'>(</span><span class='const'>File</span><span class='op'>::</span><span class='const'>LOCK_UN</span><span class='rparen'>)</span> <span class='id identifier rubyid_fp'>fp</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span> <span class='kw'>rescue</span> <span class='kw'>nil</span> @@ -875,26 +1117,26 @@ <tr> <td> <pre class="lines"> -150 -151 -152 -153 -154 -155 -156 -157 -158 -159 -160 -161 -162</pre> +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/triglav/agent/storage_file.rb', line 150</span> + <pre class="code"><span class="info file"># File 'lib/triglav/agent/storage_file.rb', line 185</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_select!'>select!</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_parents'>parents</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_keys'>keys</span><span class='rparen'>)</span> <span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_fp'>fp</span><span class='op'>|</span> <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='id identifier rubyid_fp'>fp</span><span class='period'>.</span><span class='id identifier rubyid_load'>load</span> <span class='kw'>if</span> <span class='id identifier rubyid_dig'>dig</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_parents'>parents</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='op'>?</span> <span class='id identifier rubyid_params'>params</span> <span class='op'>:</span> <span class='id identifier rubyid_params'>params</span><span class='period'>.</span><span class='id identifier rubyid_dig'>dig</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_parents'>parents</span><span class='rparen'>)</span><span class='rparen'>)</span> @@ -977,21 +1219,21 @@ <tr> <td> <pre class="lines"> -62 -63 -64 -65 -66 -67 -68 -69</pre> +97 +98 +99 +100 +101 +102 +103 +104</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/triglav/agent/storage_file.rb', line 62</span> + <pre class="code"><span class="info file"># File 'lib/triglav/agent/storage_file.rb', line 97</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_set'>set</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_val'>val</span><span class='rparen'>)</span> <span class='id identifier rubyid_keys'>keys</span> <span class='op'>=</span> <span class='const'>Array</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> <span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_fp'>fp</span><span class='op'>|</span> <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='id identifier rubyid_fp'>fp</span><span class='period'>.</span><span class='id identifier rubyid_load'>load</span> @@ -1087,23 +1329,23 @@ <tr> <td> <pre class="lines"> -80 -81 -82 -83 -84 -85 -86 -87 -88 -89</pre> +133 +134 +135 +136 +137 +138 +139 +140 +141 +142</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/triglav/agent/storage_file.rb', line 80</span> + <pre class="code"><span class="info file"># File 'lib/triglav/agent/storage_file.rb', line 133</span> <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_setnx'>setnx</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_val'>val</span><span class='rparen'>)</span> <span class='id identifier rubyid_keys'>keys</span> <span class='op'>=</span> <span class='const'>Array</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span> <span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_fp'>fp</span><span class='op'>|</span> <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='id identifier rubyid_fp'>fp</span><span class='period'>.</span><span class='id identifier rubyid_load'>load</span> @@ -1163,16 +1405,16 @@ <tr> <td> <pre class="lines"> -141 -142 -143</pre> +34 +35 +36</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/triglav/agent/storage_file.rb', line 141</span> + <pre class="code"><span class="info file"># File 'lib/triglav/agent/storage_file.rb', line 34</span> <span class='kw'>def</span> <span class='id identifier rubyid_dump'>dump</span><span class='lparen'>(</span><span class='id identifier rubyid_hash'>hash</span><span class='rparen'>)</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='ivar'>@fp</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='const'>YAML</span><span class='period'>.</span><span class='id identifier rubyid_dump'>dump</span><span class='lparen'>(</span><span class='id identifier rubyid_hash'>hash</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> @@ -1217,20 +1459,20 @@ <tr> <td> <pre class="lines"> -130 -131 -132 -133 -134 -135 -136</pre> +23 +24 +25 +26 +27 +28 +29</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/triglav/agent/storage_file.rb', line 130</span> + <pre class="code"><span class="info file"># File 'lib/triglav/agent/storage_file.rb', line 23</span> <span class='kw'>def</span> <span class='id identifier rubyid_load'>load</span> <span class='kw'>if</span> <span class='op'>!</span><span class='lparen'>(</span><span class='id identifier rubyid_content'>content</span> <span class='op'>=</span> <span class='ivar'>@fp</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='const'>YAML</span><span class='period'>.</span><span class='id identifier rubyid_load'>load</span><span class='lparen'>(</span><span class='id identifier rubyid_content'>content</span><span class='rparen'>)</span> <span class='comment'># all keys must be symbols </span> <span class='kw'>else</span> @@ -1245,10 +1487,10 @@ </div> </div> <div id="footer"> - Generated on Tue Mar 14 19:09:27 2017 by + Generated on Fri Mar 24 11:36:54 2017 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.5 (ruby-2.3.2). </div> </div> \ No newline at end of file