docs/Rudder/DSL/Pipeline.html in rudder-0.1.0 vs docs/Rudder/DSL/Pipeline.html in rudder-0.2.0

- old
+ new

@@ -134,15 +134,29 @@ <p><span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Pipeline</a></span>&#39;s can load other pipeline definitions using <span class='object_link'><a href="#load-instance_method" title="Rudder::DSL::Pipeline#load (method)">#load</a></span>. This is a useful mechanism for abstracting out common subsections of pipelines, then merging them into larger pipelines.</p> -<h3 id="label-Loading+Individual+Components">Loading Individual Components</h3> +<h3 id="label-Merging+Pipeline+Components">Merging Pipeline Components</h3> +<p><span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Pipeline</a></span>&#39;s can merge loaded or defined +Rudder::DSL:Pipelines&#39;s, Hash&#39;s of components, or Array&#39;s +of components into the current definition using +<span class='object_link'><a href="#merge_components-instance_method" title="Rudder::DSL::Pipeline#merge_components (method)">#merge_components</a></span>.</p> + +<h3 id="label-Including+Other+Pipelines">Including Other Pipelines</h3> + +<p><span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Pipeline</a></span>&#39;s can include other pipeline definitions using +<span class='object_link'><a href="#include_pipeline-instance_method" title="Rudder::DSL::Pipeline#include_pipeline (method)">#include_pipeline</a></span>. This is similar to +Rudder::DSL:Pipeline#load except that all the components are +automatically included into this <span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Pipeline</a></span></p> + +<h3 id="label-Including+Individual+Components">Including Individual Components</h3> + <p>Individual pipeline components can also be defined on a per-file basis and then loaded into a <span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Pipeline</a></span> using -<span class='object_link'><a href="#load_component-instance_method" title="Rudder::DSL::Pipeline#load_component (method)">#load_component</a></span>. This is useful for factoring out +<span class='object_link'><a href="#include_component-instance_method" title="Rudder::DSL::Pipeline#include_component (method)">#include_component</a></span>. This is useful for factoring out common resources for multiple pipeline&#39;s to use.</p> </div> </div> @@ -224,11 +238,11 @@ </span><span class='comment'># some_operations_pipeline.rb </span><span class='comment'># </span> <span class='comment'># load the resource into the pipeline. Automatically includes </span><span class='comment'># the resource into the resources list with the name :scripts -</span><span class='id identifier rubyid_load_component'>load_component</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>operations_scripts_resource.rb</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='symbol'>:resource</span><span class='comma'>,</span> <span class='symbol'>:scripts</span> +</span><span class='id identifier rubyid_include_component'>include_component</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>operations_scripts_resource.rb</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='symbol'>:resource</span><span class='comma'>,</span> <span class='symbol'>:scripts</span> <span class='id identifier rubyid_job'>job</span> <span class='symbol'>:audit</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_pipeline'>pipeline</span><span class='op'>|</span> <span class='id identifier rubyid_plan'>plan</span> <span class='op'>&lt;&lt;</span> <span class='lbrace'>{</span> <span class='label'>task:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>run the audit script</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>config:</span> <span class='lbrace'>{</span> <span class='label'>platform:</span> <span class='symbol'>:linux</span><span class='comma'>,</span> @@ -244,10 +258,17 @@ <span class='kw'>end</span></code></pre> </div> + <p class="tag_title">See Also:</p> + <ul class="see"> + + <li><span class='object_link'><a href="#merge_components-instance_method" title="Rudder::DSL::Pipeline#merge_components (method)">#merge_components for modes of operation.</a></span></li> + + </ul> + </div> <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2> @@ -375,11 +396,11 @@ <ul class="summary"> <li class="public "> <span class="summary_signature"> - <a href="#_get_local_component-instance_method" title="#_get_local_component (instance method)">#<strong>_get_local_component</strong>(component) &#x21d2; Object </a> + <a href="#eval-instance_method" title="#eval (instance method)">#<strong>eval</strong>(file_path = nil) &#x21d2; Rudder::DSL::Pipeline </a> </span> @@ -390,21 +411,20 @@ <span class="summary_desc"><div class='inline'> -<p>Yikes! Seems like a bad idea - if someone uses the same name twice (say, 1 -resource and 1 job), then this will return one pretty much at random.</p> +<p>Evaluates the given file path.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> - <a href="#eval-instance_method" title="#eval (instance method)">#<strong>eval</strong>(file_path = nil) &#x21d2; Rudder::DSL::Pipeline </a> + <a href="#include_component-instance_method" title="#include_component (instance method)">#<strong>include_component</strong>(component_path, class_sym, name, *args) &#x21d2; Object </a> </span> @@ -415,19 +435,45 @@ <span class="summary_desc"><div class='inline'> -<p>Evaluates the given file path.</p> +<p>Given a path to a component, its class, and any args required to construct +it, creates a new component.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> + <a href="#include_pipeline-instance_method" title="#include_pipeline (instance method)">#<strong>include_pipeline</strong>(other_pipeline_path) &#x21d2; nil </a> + + + + </span> + + + + + + + + + + <span class="summary_desc"><div class='inline'> +<p>Includes another <span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Pipeline</a></span> from a file into this +<span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Pipeline</a></span>.</p> +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(file_path = nil, resources: {}, jobs: {}, groups: {}, resource_types: {}) &#x21d2; Pipeline </a> </span> @@ -475,11 +521,11 @@ <li class="public "> <span class="summary_signature"> - <a href="#load_component-instance_method" title="#load_component (instance method)">#<strong>load_component</strong>(component_path, class_sym, name, *args) &#x21d2; Object </a> + <a href="#merge_components-instance_method" title="#merge_components (instance method)">#<strong>merge_components</strong>(components) &#x21d2; nil </a> </span> @@ -490,12 +536,12 @@ <span class="summary_desc"><div class='inline'> -<p>Given a path to a component, its class, and any args required to construct -it, creates a new component.</p> +<p>Merges the provided <span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Pipeline</a></span> components into this +<span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Pipeline</a></span>.</p> </div></span> </li> @@ -525,10 +571,34 @@ <li class="public "> <span class="summary_signature"> + <a href="#p_convert_h_val-instance_method" title="#p_convert_h_val (instance method)">#<strong>p_convert_h_val</strong>(hash) &#x21d2; Object </a> + + + + </span> + + + + + + + + + + <span class="summary_desc"><div class='inline'> +<p>Wraps <span class='object_link'><a href="Util.html#_convert_h_val-instance_method" title="Rudder::DSL::Util#_convert_h_val (method)">Util#_convert_h_val</a></span> since it will always set use_name to false.</p> +</div></span> + +</li> + + + <li class="public "> + <span class="summary_signature"> + <a href="#respond_to%3F-instance_method" title="#respond_to? (instance method)">#<strong>respond_to?</strong>(name, _include_all = true) &#x21d2; Boolean </a> </span> @@ -749,30 +819,30 @@ <tr> <td> <pre class="lines"> -166 -167 -168 -169 -170 -171 -172 -173 -174 -175 -176 -177 -178 -179 -180 -181 -182</pre> +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 166</span> + <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 183</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_file_path'>file_path</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>resources:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='label'>jobs:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='label'>groups:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='label'>resource_types:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='ivar'>@resources</span> <span class='op'>=</span> <span class='id identifier rubyid_resources'>resources</span> <span class='ivar'>@jobs</span> <span class='op'>=</span> <span class='id identifier rubyid_jobs'>jobs</span> @@ -890,31 +960,31 @@ <tr> <td> <pre class="lines"> -237 -238 -239 -240 -241 -242 -243 -244 -245 -246 -247 -248 -249 -250 -251 -252 -253 -254</pre> +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 237</span> + <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 261</span> <span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_component_block'>component_block</span><span class='rparen'>)</span> <span class='id identifier rubyid_local_component'>local_component</span> <span class='op'>=</span> <span class='id identifier rubyid__get_local_component'>_get_local_component</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='ivar'>@known_classes</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='id identifier rubyid_local_component'>local_component</span> <span class='kw'>return</span> <span class='kw'>super</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='id identifier rubyid_component_block'>component_block</span><span class='rparen'>)</span> @@ -981,16 +1051,16 @@ <tr> <td> <pre class="lines"> -138 -139 -140</pre> +155 +156 +157</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 138</span> + <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 155</span> <span class='kw'>def</span> <span class='id identifier rubyid_groups'>groups</span> <span class='ivar'>@groups</span> <span class='kw'>end</span></pre> </td> @@ -1037,16 +1107,16 @@ <tr> <td> <pre class="lines"> -132 -133 -134</pre> +149 +150 +151</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 132</span> + <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 149</span> <span class='kw'>def</span> <span class='id identifier rubyid_jobs'>jobs</span> <span class='ivar'>@jobs</span> <span class='kw'>end</span></pre> </td> @@ -1093,16 +1163,16 @@ <tr> <td> <pre class="lines"> -135 -136 -137</pre> +152 +153 +154</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 135</span> + <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 152</span> <span class='kw'>def</span> <span class='id identifier rubyid_resource_types'>resource_types</span> <span class='ivar'>@resource_types</span> <span class='kw'>end</span></pre> </td> @@ -1149,16 +1219,16 @@ <tr> <td> <pre class="lines"> -129 -130 -131</pre> +146 +147 +148</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 129</span> + <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 146</span> <span class='kw'>def</span> <span class='id identifier rubyid_resources'>resources</span> <span class='ivar'>@resources</span> <span class='kw'>end</span></pre> </td> @@ -1172,140 +1242,241 @@ <div id="instance_method_details" class="method_details_list"> <h2>Instance Method Details</h2> <div class="method_details first"> - <h3 class="signature first" id="_get_local_component-instance_method"> + <h3 class="signature first" id="eval-instance_method"> - #<strong>_get_local_component</strong>(component) &#x21d2; <tt>Object</tt> + #<strong>eval</strong>(file_path = nil) &#x21d2; <tt><span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Rudder::DSL::Pipeline</a></span></tt> </h3><div class="docstring"> <div class="discussion"> -<p>Yikes! Seems like a bad idea - if someone uses the same name twice (say, 1 -resource and 1 job), then this will return one pretty much at random. TODO: -Make this not bad Oh well.. TODO: This may be returning a -non-nil/non-falsey type that causes some issues</p> +<p>Evaluates the given file path. If file_path nil, defaults to the one +provided at construction time If both are nil, raises an exception</p> </div> </div> <div class="tags"> + <p class="tag_title">Parameters:</p> +<ul class="param"> + <li> + + <span class='name'>file_path</span> + + + <span class='type'>(<tt>String</tt>, <tt>nil</tt>)</span> + + + <em class="default">(defaults to: <tt>nil</tt>)</em> + + + &mdash; + <div class='inline'> +<p>path to <span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Rudder::DSL::Pipeline</a></span> definition to evaluate. Uses the current +<code>file_path</code> if <code>nil</code></p> +</div> + + </li> + +</ul> +<p class="tag_title">Returns:</p> +<ul class="return"> + + <li> + + + <span class='type'>(<tt><span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Rudder::DSL::Pipeline</a></span></tt>)</span> + + + + &mdash; + <div class='inline'> +<p>the evaluated pipeline</p> +</div> + + </li> + +</ul> +<p class="tag_title">Raises:</p> +<ul class="raise"> + + <li> + + + <span class='type'>(<tt>RuntimeError</tt>)</span> + + + + &mdash; + <div class='inline'> +<p>if <code>file_path</code> and #file_path are both +<code>nil</code></p> +</div> + + </li> + +</ul> + </div><table class="source_code"> <tr> <td> <pre class="lines"> -363 -364 -365 -366 -367 -368 -369 -370 -371</pre> +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 363</span> + <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 303</span> -<span class='kw'>def</span> <span class='id identifier rubyid__get_local_component'>_get_local_component</span><span class='lparen'>(</span><span class='id identifier rubyid_component'>component</span><span class='rparen'>)</span> - <span class='id identifier rubyid_component'>component</span> <span class='op'>=</span> <span class='id identifier rubyid_component'>component</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span> - <span class='id identifier rubyid_locals'>locals</span> <span class='op'>=</span> <span class='ivar'>@known_classes</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_m'>m</span><span class='op'>|</span> - <span class='id identifier rubyid_m'>m</span><span class='lbracket'>[</span><span class='symbol'>:pipeline_group</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='id identifier rubyid_component'>component</span><span class='rbracket'>]</span> - <span class='kw'>end</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span> - <span class='comment'># TODO: Add a logger here.. -</span> <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Found multiple bindings for: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_p'>p</span><span class='embexpr_end'>}</span><span class='tstring_content'>. Getting first found</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_locals'>locals</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>&lt;=</span> <span class='int'>1</span> - <span class='id identifier rubyid_locals'>locals</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> +<span class='kw'>def</span> <span class='id identifier rubyid_eval'>eval</span><span class='lparen'>(</span><span class='id identifier rubyid_file_path'>file_path</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span> + <span class='ivar'>@file_path</span> <span class='op'>=</span> <span class='id identifier rubyid_file_path'>file_path</span> <span class='op'>||</span> <span class='ivar'>@file_path</span> + <span class='kw'>if</span> <span class='ivar'>@file_path</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> + <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>File path must be provided at Pipeline initialization or eval call</span><span class='tstring_end'>&#39;</span></span> + <span class='kw'>end</span> + + <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='ivar'>@file_path</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span> + <span class='id identifier rubyid_instance_eval'>instance_eval</span> <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='comma'>,</span> <span class='ivar'>@file_path</span> + <span class='kw'>end</span> + <span class='kw'>self</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> - <h3 class="signature " id="eval-instance_method"> + <h3 class="signature " id="include_component-instance_method"> - #<strong>eval</strong>(file_path = nil) &#x21d2; <tt><span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Rudder::DSL::Pipeline</a></span></tt> + #<strong>include_component</strong>(component_path, class_sym, name, *args) &#x21d2; <tt>Object</tt> </h3><div class="docstring"> <div class="discussion"> -<p>Evaluates the given file path. If file_path nil, defaults to the one -provided at construction time If both are nil, raises an exception</p> + <div class="note notetag"> + <strong>Note:</strong> + <div class='inline'> +<p>This automatically includes the component into this pipeline</p> +</div> + </div> +<p>Given a path to a component, its class, and any args required to construct +it, creates a new component</p> + + </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> - <span class='name'>file_path</span> + <span class='name'>component_path</span> - <span class='type'>(<tt>String</tt>, <tt>nil</tt>)</span> + <span class='type'>(<tt>String</tt>)</span> - <em class="default">(defaults to: <tt>nil</tt>)</em> + &mdash; + <div class='inline'> +<p>path, relative to this pipeline, containing a <span class='object_link'><a href="Component.html" title="Rudder::DSL::Component (class)">Component</a></span> to +load</p> +</div> + </li> + + <li> + + <span class='name'>class_sym</span> + + + <span class='type'>(<tt>Symbol</tt>)</span> + + + &mdash; <div class='inline'> -<p>path to <span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Rudder::DSL::Pipeline</a></span> definition to evaluate. Uses the current -<code>file_path</code> if <code>nil</code></p> +<p>symbol of a <span class='object_link'><a href="Component.html" title="Rudder::DSL::Component (class)">Component</a></span>. May be one of: (<code>:job</code>, +<code>:resource</code>, <code>:resource_type</code>, <code>:group</code>)</p> </div> </li> -</ul> - -<p class="tag_title">Returns:</p> -<ul class="return"> + <li> + + <span class='name'>name</span> + + + <span class='type'>(<tt>String</tt>, <tt>Symbol</tt>)</span> + + + + &mdash; + <div class='inline'> +<p>name to use for the loaded <span class='object_link'><a href="Component.html" title="Rudder::DSL::Component (class)">Component</a></span>. Must not be +<code>nil</code>.</p> +</div> + + </li> <li> + <span class='name'>*args</span> - <span class='type'>(<tt><span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Rudder::DSL::Pipeline</a></span></tt>)</span> + <span class='type'></span> + &mdash; <div class='inline'> -<p>the evaluated pipeline</p> +<p>any additional arguments to pass to the <span class='object_link'><a href="Component.html" title="Rudder::DSL::Component (class)">Component</a></span> +constructor.</p> </div> </li> </ul> + <p class="tag_title">Raises:</p> <ul class="raise"> <li> - <span class='type'>(<tt>RuntimeError</tt>)</span> + <span class='type'></span> - &mdash; + <div class='inline'> -<p>if <code>file_path</code> and #file_path are both -<code>nil</code></p> +<p>RuntimeError if <code>name</code> is <code>nil</code> or an uknown +<code>class_sym</code> is provided.</p> </div> </li> </ul> @@ -1314,42 +1485,126 @@ <tr> <td> <pre class="lines"> -279 -280 -281 -282 -283 -284 -285 -286 -287 -288 -289</pre> +371 +372 +373 +374 +375 +376 +377 +378 +379 +380</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 279</span> + <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 371</span> -<span class='kw'>def</span> <span class='id identifier rubyid_eval'>eval</span><span class='lparen'>(</span><span class='id identifier rubyid_file_path'>file_path</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span> - <span class='ivar'>@file_path</span> <span class='op'>=</span> <span class='id identifier rubyid_file_path'>file_path</span> <span class='op'>||</span> <span class='ivar'>@file_path</span> - <span class='kw'>if</span> <span class='ivar'>@file_path</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> - <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>File path must be provided at Pipeline initialization or eval call</span><span class='tstring_end'>&#39;</span></span> - <span class='kw'>end</span> +<span class='kw'>def</span> <span class='id identifier rubyid_include_component'>include_component</span><span class='lparen'>(</span><span class='id identifier rubyid_component_path'>component_path</span><span class='comma'>,</span> <span class='id identifier rubyid_class_sym'>class_sym</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span> + <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Unable to load </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_class_sym'>class_sym</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='ivar'>@known_classes</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_class_sym'>class_sym</span> + <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Name must not be nil</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> - <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='ivar'>@file_path</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span> - <span class='id identifier rubyid_instance_eval'>instance_eval</span> <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='comma'>,</span> <span class='ivar'>@file_path</span> - <span class='kw'>end</span> - <span class='kw'>self</span> + <span class='id identifier rubyid_full_path'>full_path</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='ivar'>@file_path</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_component_path'>component_path</span><span class='rparen'>)</span> + <span class='id identifier rubyid_component'>component</span> <span class='op'>=</span> <span class='ivar'>@known_classes</span><span class='lbracket'>[</span><span class='id identifier rubyid_class_sym'>class_sym</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:clazz</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span> + <span class='id identifier rubyid_component'>component</span><span class='period'>.</span><span class='id identifier rubyid_instance_eval'>instance_eval</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_full_path'>full_path</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_full_path'>full_path</span> + <span class='ivar'>@known_classes</span><span class='lbracket'>[</span><span class='id identifier rubyid_class_sym'>class_sym</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:pipeline_group</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_component'>component</span> + <span class='id identifier rubyid_component'>component</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <div class="method_details "> + <h3 class="signature " id="include_pipeline-instance_method"> + + #<strong>include_pipeline</strong>(other_pipeline_path) &#x21d2; <tt>nil</tt> + + + + + +</h3><div class="docstring"> + <div class="discussion"> + + <div class="note notetag"> + <strong>Note:</strong> + <div class='inline'> +<p>Any component provided that has an overlapping name with a previously +defined component in this pipeline will override the previous definition</p> +</div> + </div> + + +<p>Includes another <span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Rudder::DSL::Pipeline</a></span> from a file into this +<span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Rudder::DSL::Pipeline</a></span>.</p> + + + </div> +</div> +<div class="tags"> + <p class="tag_title">Parameters:</p> +<ul class="param"> + + <li> + + <span class='name'>other_pipeline_path</span> + + + <span class='type'>(<tt>String</tt>)</span> + + + + &mdash; + <div class='inline'> +<p>path to the <span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Rudder::DSL::Pipeline</a></span> definition</p> +</div> + + </li> + +</ul> + +<p class="tag_title">Returns:</p> +<ul class="return"> + + <li> + + + <span class='type'>(<tt>nil</tt>)</span> + + + + </li> + +</ul> + +</div><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +393 +394 +395 +396</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 393</span> + +<span class='kw'>def</span> <span class='id identifier rubyid_include_pipeline'>include_pipeline</span><span class='lparen'>(</span><span class='id identifier rubyid_other_pipeline_path'>other_pipeline_path</span><span class='rparen'>)</span> + <span class='id identifier rubyid_pipeline'>pipeline</span> <span class='op'>=</span> <span class='id identifier rubyid_load'>load</span> <span class='id identifier rubyid_other_pipeline_path'>other_pipeline_path</span> + <span class='id identifier rubyid_merge_components'>merge_components</span><span class='lparen'>(</span><span class='id identifier rubyid_pipeline'>pipeline</span><span class='rparen'>)</span> +<span class='kw'>end</span></pre> + </td> + </tr> +</table> +</div> + + <div class="method_details "> <h3 class="signature " id="load-instance_method"> #<strong>load</strong>(other_pipeline_path, resources: {}, resource_types: {}, jobs: {}, groups: {}) &#x21d2; <tt>Object</tt> @@ -1478,28 +1733,28 @@ <tr> <td> <pre class="lines"> -314 -315 -316 -317 -318 -319 -320 -321 -322 -323 -324 -325 -326 -327 -328</pre> +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 314</span> + <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 338</span> <span class='kw'>def</span> <span class='id identifier rubyid_load'>load</span><span class='lparen'>(</span><span class='id identifier rubyid_other_pipeline_path'>other_pipeline_path</span><span class='comma'>,</span> <span class='label'>resources:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='label'>resource_types:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='label'>jobs:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='label'>groups:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='ivar'>@pipelines</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span> <span class='id identifier rubyid_other_pipeline_path'>other_pipeline_path</span> <span class='ivar'>@pipelines</span><span class='lbracket'>[</span><span class='id identifier rubyid_other_pipeline_path'>other_pipeline_path</span><span class='rbracket'>]</span> @@ -1518,117 +1773,103 @@ </tr> </table> </div> <div class="method_details "> - <h3 class="signature " id="load_component-instance_method"> + <h3 class="signature " id="merge_components-instance_method"> - #<strong>load_component</strong>(component_path, class_sym, name, *args) &#x21d2; <tt>Object</tt> + #<strong>merge_components</strong>(components) &#x21d2; <tt>nil</tt> </h3><div class="docstring"> <div class="discussion"> -<p>Given a path to a component, its class, and any args required to construct -it, creates a new component</p> + <div class="note notetag"> + <strong>Note:</strong> + <div class='inline'> +<p>Any component provided that has an overlapping name with a previously +defined component in this pipeline will override the previous definition</p> +</div> + </div> -<p>Note that this automatically includes the component into this pipeline</p> +<p>Merges the provided <span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Rudder::DSL::Pipeline</a></span> components into this +<span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Rudder::DSL::Pipeline</a></span>.</p> +<h2 id="label-Modes+of+Operation-3A">Modes of Operation:</h2> +<ul><li> +<p><span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Rudder::DSL::Pipeline</a></span>:</p> +</li></ul> + +<p>When provided a Pipeline, merges all like components into this Pipeline</p> +<ul><li> +<p>Hash&lt;String, Component&gt;:</p> +</li></ul> + +<p>When provided a Hash, merges all the components into the like Hash in this +Pipeline</p> +<ul><li> +<p>Array&lt;Component&gt;:</p> +</li></ul> + +<p>When provided an Array, merges all Components into this Pipeline. Inserts +components into their respective Pipeline group by class.</p> + + </div> </div> <div class="tags"> <p class="tag_title">Parameters:</p> <ul class="param"> <li> - <span class='name'>component_path</span> + <span class='name'>components</span> - <span class='type'>(<tt>String</tt>)</span> + <span class='type'>(<tt>{<span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Rudder::DSL::Pipeline</a></span>}</tt>, <tt>Hash</tt>, <tt>Array</tt>)</span> &mdash; <div class='inline'> -<p>path, relative to this pipeline, containing a <span class='object_link'><a href="Component.html" title="Rudder::DSL::Component (class)">Component</a></span> to -load</p> +<p>See Modes of Operation for details</p> </div> </li> - <li> - - <span class='name'>class_sym</span> - - - <span class='type'>(<tt>Symbol</tt>)</span> - - - - &mdash; - <div class='inline'> -<p>symbol of a <span class='object_link'><a href="Component.html" title="Rudder::DSL::Component (class)">Component</a></span>. May be one of: (<code>:job</code>, -<code>:resource</code>, <code>:resource_type</code>, <code>:group</code>)</p> -</div> - - </li> +</ul> + +<p class="tag_title">Returns:</p> +<ul class="return"> <li> - <span class='name'>name</span> + <span class='type'>(<tt>nil</tt>)</span> - <span class='type'>(<tt>String</tt>, <tt>Symbol</tt>)</span> - - &mdash; - <div class='inline'> -<p>name to use for the loaded <span class='object_link'><a href="Component.html" title="Rudder::DSL::Component (class)">Component</a></span>. Must not be -<code>nil</code>.</p> -</div> - </li> - <li> - - <span class='name'>*args</span> - - - <span class='type'></span> - - - - &mdash; - <div class='inline'> -<p>any additional arguments to pass to the <span class='object_link'><a href="Component.html" title="Rudder::DSL::Component (class)">Component</a></span> -constructor.</p> -</div> - - </li> - </ul> - <p class="tag_title">Raises:</p> <ul class="raise"> <li> - <span class='type'></span> + <span class='type'>(<tt>RuntimeError</tt>)</span> - + &mdash; <div class='inline'> -<p>RuntimeError if <code>name</code> is <code>nil</code> or an uknown -<code>class_sym</code> is provided.</p> +<p>when type provided is unsupported</p> </div> </li> </ul> @@ -1637,33 +1878,70 @@ <tr> <td> <pre class="lines"> -347 -348 -349 -350 -351 -352 -353 -354 -355 -356</pre> +425 +426 +427 +428 +429 +430 +431 +432</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 347</span> + <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 425</span> -<span class='kw'>def</span> <span class='id identifier rubyid_load_component'>load_component</span><span class='lparen'>(</span><span class='id identifier rubyid_component_path'>component_path</span><span class='comma'>,</span> <span class='id identifier rubyid_class_sym'>class_sym</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span> - <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Unable to load </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_class_sym'>class_sym</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='ivar'>@known_classes</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_class_sym'>class_sym</span> - <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Name must not be nil</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> +<span class='kw'>def</span> <span class='id identifier rubyid_merge_components'>merge_components</span><span class='lparen'>(</span><span class='id identifier rubyid_components'>components</span><span class='rparen'>)</span> + <span class='kw'>case</span> <span class='id identifier rubyid_components'>components</span> + <span class='kw'>when</span> <span class='const'><span class='object_link'><a href="" title="Rudder::DSL::Pipeline (class)">Pipeline</a></span></span> <span class='kw'>then</span> <span class='id identifier rubyid__merge_pipeline'>_merge_pipeline</span><span class='lparen'>(</span><span class='id identifier rubyid_components'>components</span><span class='rparen'>)</span> + <span class='kw'>when</span> <span class='const'>Hash</span> <span class='kw'>then</span> <span class='id identifier rubyid__merge_hash'>_merge_hash</span><span class='lparen'>(</span><span class='id identifier rubyid_components'>components</span><span class='rparen'>)</span> + <span class='kw'>when</span> <span class='const'>Array</span> <span class='kw'>then</span> <span class='id identifier rubyid__merge_array'>_merge_array</span><span class='lparen'>(</span><span class='id identifier rubyid_components'>components</span><span class='rparen'>)</span> + <span class='kw'>else</span> <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Unable to merge #{components}: unsupported type</span><span class='tstring_end'>&#39;</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="p_convert_h_val-instance_method"> + + #<strong>p_convert_h_val</strong>(hash) &#x21d2; <tt>Object</tt> + - <span class='id identifier rubyid_full_path'>full_path</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='ivar'>@file_path</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_component_path'>component_path</span><span class='rparen'>)</span> - <span class='id identifier rubyid_component'>component</span> <span class='op'>=</span> <span class='ivar'>@known_classes</span><span class='lbracket'>[</span><span class='id identifier rubyid_class_sym'>class_sym</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:clazz</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span> - <span class='id identifier rubyid_component'>component</span><span class='period'>.</span><span class='id identifier rubyid_instance_eval'>instance_eval</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_read'>read</span><span class='lparen'>(</span><span class='id identifier rubyid_full_path'>full_path</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_full_path'>full_path</span> - <span class='ivar'>@known_classes</span><span class='lbracket'>[</span><span class='id identifier rubyid_class_sym'>class_sym</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='symbol'>:pipeline_group</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='id identifier rubyid_name'>name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_component'>component</span> - <span class='id identifier rubyid_component'>component</span> + + + +</h3><div class="docstring"> + <div class="discussion"> + +<p>Wraps <span class='object_link'><a href="Util.html#_convert_h_val-instance_method" title="Rudder::DSL::Util#_convert_h_val (method)">Util#_convert_h_val</a></span> since it will always set use_name to false</p> + + + </div> +</div> +<div class="tags"> + + +</div><table class="source_code"> + <tr> + <td> + <pre class="lines"> + + +222 +223 +224</pre> + </td> + <td> + <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 222</span> + +<span class='kw'>def</span> <span class='id identifier rubyid_p_convert_h_val'>p_convert_h_val</span><span class='lparen'>(</span><span class='id identifier rubyid_hash'>hash</span><span class='rparen'>)</span> + <span class='id identifier rubyid__convert_h_val'>_convert_h_val</span><span class='lparen'>(</span><span class='id identifier rubyid_hash'>hash</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> @@ -1703,16 +1981,16 @@ <tr> <td> <pre class="lines"> -265 -266 -267</pre> +289 +290 +291</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 265</span> + <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 289</span> <span class='kw'>def</span> <span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid__include_all'>_include_all</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='ivar'>@known_classes</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span> <span class='id identifier rubyid_name'>name</span> <span class='kw'>end</span></pre> </td> @@ -1762,16 +2040,16 @@ <tr> <td> <pre class="lines"> -261 -262 -263</pre> +285 +286 +287</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 261</span> + <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 285</span> <span class='kw'>def</span> <span class='id identifier rubyid_respond_to_missing?'>respond_to_missing?</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid__'>_</span><span class='rparen'>)</span> <span class='kw'>true</span> <span class='kw'>end</span></pre> </td> @@ -1825,30 +2103,30 @@ <tr> <td> <pre class="lines"> -192 -193 -194 -195 -196 -197 -198 -199 -200</pre> +209 +210 +211 +212 +213 +214 +215 +216 +217</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 192</span> + <pre class="code"><span class="info file"># File 'lib/rudder/dsl/pipeline.rb', line 209</span> <span class='kw'>def</span> <span class='id identifier rubyid_to_h'>to_h</span> <span class='id identifier rubyid_h'>h</span> <span class='op'>=</span> <span class='lbrace'>{</span> - <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>resources</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid__convert_h_val'>_convert_h_val</span><span class='lparen'>(</span><span class='ivar'>@resources</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='rparen'>)</span><span class='comma'>,</span> - <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>jobs</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid__convert_h_val'>_convert_h_val</span><span class='lparen'>(</span><span class='ivar'>@jobs</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='rparen'>)</span> + <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>resources</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_p_convert_h_val'>p_convert_h_val</span><span class='lparen'>(</span><span class='ivar'>@resources</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='rparen'>)</span><span class='comma'>,</span> + <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>jobs</span><span class='tstring_end'>&#39;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_p_convert_h_val'>p_convert_h_val</span><span class='lparen'>(</span><span class='ivar'>@jobs</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='rparen'>)</span> <span class='rbrace'>}</span> - <span class='id identifier rubyid_h'>h</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>groups</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid__convert_h_val'>_convert_h_val</span><span class='lparen'>(</span><span class='ivar'>@groups</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='ivar'>@groups</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> - <span class='id identifier rubyid_h'>h</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>resource_types</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid__convert_h_val'>_convert_h_val</span><span class='lparen'>(</span><span class='ivar'>@resource_types</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='ivar'>@resource_types</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> + <span class='id identifier rubyid_h'>h</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>groups</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_p_convert_h_val'>p_convert_h_val</span><span class='lparen'>(</span><span class='ivar'>@groups</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='ivar'>@groups</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> + <span class='id identifier rubyid_h'>h</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>resource_types</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_p_convert_h_val'>p_convert_h_val</span><span class='lparen'>(</span><span class='ivar'>@resource_types</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='ivar'>@resource_types</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span> <span class='id identifier rubyid_h'>h</span> <span class='kw'>end</span></pre> </td> </tr> </table> @@ -1857,10 +2135,10 @@ </div> </div> <div id="footer"> - Generated on Thu Aug 1 22:21:15 2019 by + Generated on Fri Aug 2 21:10:14 2019 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.9.20 (ruby-2.5.1). </div> </div> \ No newline at end of file