doc/Mbrao/RenderingEngines/HtmlPipeline.html in mbrao-1.4.4 vs doc/Mbrao/RenderingEngines/HtmlPipeline.html in mbrao-1.5.0
- old
+ new
@@ -261,10 +261,36 @@
<tr>
<td>
<pre class="lines">
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
44
45
46
47
48
@@ -342,39 +368,14 @@
120
121
122
123
124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150</pre>
+125</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/mbrao/rendering_engines/html_pipeline.rb', line 44</span>
+ <pre class="code"><span class="info file"># File 'lib/mbrao/rendering_engines/html_pipeline.rb', line 18</span>
<span class='kw'>class</span> <span class='const'>HtmlPipeline</span> <span class='op'><</span> <span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>RenderingEngines</span><span class='op'>::</span><span class='const'>Base</span>
<span class='id identifier rubyid_attr_accessor'>attr_accessor</span> <span class='symbol'>:default_pipeline</span>
<span class='id identifier rubyid_attr_accessor'>attr_accessor</span> <span class='symbol'>:default_options</span>
@@ -390,11 +391,11 @@
<span class='kw'>begin</span>
<span class='id identifier rubyid_create_pipeline'>create_pipeline</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_get_body'>get_body</span><span class='lparen'>(</span><span class='id identifier rubyid_content'>content</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='symbol'>:output</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
<span class='kw'>rescue</span> <span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Exceptions</span><span class='op'>::</span><span class='const'>UnavailableLocalization</span> <span class='op'>=></span> <span class='id identifier rubyid_le'>le</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='id identifier rubyid_le'>le</span>
<span class='kw'>rescue</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
- <span class='id identifier rubyid_raise'>raise</span> <span class='op'>::</span><span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Exceptions</span><span class='op'>::</span><span class='const'>Rendering</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_raise'>raise</span> <span class='op'>::</span><span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Exceptions</span><span class='op'>::</span><span class='const'>Rendering</span><span class='comma'>,</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
<span class='kw'>end</span>
<span class='kw'>end</span>
<span class='comment'># Gets the default pipeline.
</span> <span class='comment'>#
@@ -405,11 +406,11 @@
<span class='comment'># Sets the default pipeline.
</span> <span class='comment'>#
</span> <span class='comment'># @return [Array] The default pipeline.
</span> <span class='kw'>def</span> <span class='id identifier rubyid_default_pipeline='>default_pipeline=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
- <span class='ivar'>@default_pipeline</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='op'>|</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span> <span class='rbrace'>}</span> <span class='rbrace'>}</span>
+ <span class='ivar'>@default_pipeline</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='op'>|</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span> <span class='rbrace'>}</span> <span class='rbrace'>}</span>
<span class='kw'>end</span>
<span class='comment'># Gets the default options.
</span> <span class='comment'>#
</span> <span class='comment'># @return [Hash] The default options.
@@ -423,65 +424,66 @@
</span> <span class='kw'>def</span> <span class='id identifier rubyid_default_options='>default_options=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
<span class='ivar'>@default_options</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_ensure_hash'>ensure_hash</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_private'>private</span>
- <span class='comment'># Sanitizes options.
-</span> <span class='comment'>#
-</span> <span class='comment'># @param options [Hash] The options to sanitize.
-</span> <span class='comment'># @return [Hash] The sanitized options.
-</span> <span class='kw'>def</span> <span class='id identifier rubyid_sanitize_options'>sanitize_options</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_ensure_hash'>ensure_hash</span><span class='lparen'>(</span><span class='symbol'>:symbols</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='id identifier rubyid_filter_filters'>filter_filters</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline_options</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default_options'>default_options</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline_options</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_ensure_hash'>ensure_hash</span><span class='lparen'>(</span><span class='symbol'>:symbols</span><span class='rparen'>)</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_options'>options</span>
- <span class='kw'>end</span>
+ <span class='comment'># Sanitizes options.
+</span> <span class='comment'>#
+</span> <span class='comment'># @param options [Hash] The options to sanitize.
+</span> <span class='comment'># @return [Hash] The sanitized options.
+</span> <span class='kw'>def</span> <span class='id identifier rubyid_sanitize_options'>sanitize_options</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_ensure_hash'>ensure_hash</span><span class='lparen'>(</span><span class='symbol'>:symbols</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='id identifier rubyid_filter_filters'>filter_filters</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline_options</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_default_options'>default_options</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline_options</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_ensure_hash'>ensure_hash</span><span class='lparen'>(</span><span class='symbol'>:symbols</span><span class='rparen'>)</span><span class='rparen'>)</span>
- <span class='comment'># Get body of a content.
-</span> <span class='comment'>#
-</span> <span class='comment'># @param content [Content|String] The content to sanitize.
-</span> <span class='comment'># @param options [Hash] A list of options for renderer.
-</span> <span class='comment'># @return [Array] The body to parse.
-</span> <span class='kw'>def</span> <span class='id identifier rubyid_get_body'>get_body</span><span class='lparen'>(</span><span class='id identifier rubyid_content'>content</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_content'>content</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Content</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_content'>content</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_content'>content</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Content</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_content'>content</span><span class='period'>.</span><span class='id identifier rubyid_get_body'>get_body</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:locales</span><span class='comma'>,</span> <span class='op'>::</span><span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Parser</span><span class='period'>.</span><span class='id identifier rubyid_locale'>locale</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='rparen'>)</span>
- <span class='kw'>end</span>
+ <span class='id identifier rubyid_options'>options</span>
+ <span class='kw'>end</span>
- <span class='comment'># Creates the pipeline for rendering.
-</span> <span class='comment'>#
-</span> <span class='comment'># @param options [Hash] A list of options for renderer.
-</span> <span class='comment'># @param context [Hash] A context for rendering.
-</span> <span class='comment'># @return [HTML::Pipeline] The pipeline
-</span> <span class='kw'>def</span> <span class='id identifier rubyid_create_pipeline'>create_pipeline</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
- <span class='op'>::</span><span class='const'>HTML</span><span class='op'>::</span><span class='const'>Pipeline</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
- <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_find_class'>find_class</span><span class='lparen'>(</span><span class='id identifier rubyid_f'>f</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>::HTML::Pipeline::%CLASS%Filter</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='comma'>,</span>
- <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline_options</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_context'>context</span><span class='rparen'>)</span>
- <span class='rparen'>)</span>
- <span class='kw'>end</span>
+ <span class='comment'># Get body of a content.
+</span> <span class='comment'>#
+</span> <span class='comment'># @param content [Content|String] The content to sanitize.
+</span> <span class='comment'># @param options [Hash] A list of options for renderer.
+</span> <span class='comment'># @return [Array] The body to parse.
+</span> <span class='kw'>def</span> <span class='id identifier rubyid_get_body'>get_body</span><span class='lparen'>(</span><span class='id identifier rubyid_content'>content</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_content'>content</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Content</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_content'>content</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_content'>content</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Content</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_content'>content</span><span class='period'>.</span><span class='id identifier rubyid_get_body'>get_body</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:locales</span><span class='comma'>,</span> <span class='op'>::</span><span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Parser</span><span class='period'>.</span><span class='id identifier rubyid_locale'>locale</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='rparen'>)</span>
+ <span class='kw'>end</span>
- <span class='comment'># Filters pipeline filters basing on the options provided.
-</span> <span class='comment'>#
-</span> <span class='comment'># @param options [Hash] The original options.
-</span> <span class='comment'># @return [Hash] The options with the new set of filters.
-</span> <span class='kw'>def</span> <span class='id identifier rubyid_filter_filters'>filter_filters</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_get_pipeline'>get_pipeline</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
+ <span class='comment'># Creates the pipeline for rendering.
+</span> <span class='comment'>#
+</span> <span class='comment'># @param options [Hash] A list of options for renderer.
+</span> <span class='comment'># @param context [Hash] A context for rendering.
+</span> <span class='comment'># @return [HTML::Pipeline] The pipeline
+</span> <span class='kw'>def</span> <span class='id identifier rubyid_create_pipeline'>create_pipeline</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
+ <span class='op'>::</span><span class='const'>HTML</span><span class='op'>::</span><span class='const'>Pipeline</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_find_class'>find_class</span><span class='lparen'>(</span><span class='id identifier rubyid_f'>f</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>::HTML::Pipeline::%CLASS%Filter</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='comma'>,</span>
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline_options</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_context'>context</span><span class='rparen'>)</span>
+ <span class='rparen'>)</span>
+ <span class='kw'>end</span>
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default_pipeline'>default_pipeline</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_f'>f</span><span class='op'>|</span>
- <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span>
- <span class='kw'>end</span>
+ <span class='comment'># Filters pipeline filters basing on the options provided.
+</span> <span class='comment'>#
+</span> <span class='comment'># @param options [Hash] The original options.
+</span> <span class='comment'># @return [Hash] The options with the new set of filters.
+</span> <span class='kw'>def</span> <span class='id identifier rubyid_filter_filters'>filter_filters</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_get_pipeline'>get_pipeline</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_options'>options</span>
+ <span class='id identifier rubyid_default_pipeline'>default_pipeline</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_f'>f</span><span class='op'>|</span>
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span>
<span class='kw'>end</span>
- <span class='comment'># Gets the pipeline for the current options.
-</span> <span class='comment'>#
-</span> <span class='comment'># @param options [Hash] The options to parse.
-</span> <span class='comment'># @return [Array] The pipeline to process.
-</span> <span class='kw'>def</span> <span class='id identifier rubyid_get_pipeline'>get_pipeline</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:pipeline</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default_pipeline'>default_pipeline</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:first</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:to_sym</span><span class='rparen'>)</span>
- <span class='kw'>end</span>
+ <span class='id identifier rubyid_options'>options</span>
+ <span class='kw'>end</span>
+
+ <span class='comment'># Gets the pipeline for the current options.
+</span> <span class='comment'>#
+</span> <span class='comment'># @param options [Hash] The options to parse.
+</span> <span class='comment'># @return [Array] The pipeline to process.
+</span> <span class='kw'>def</span> <span class='id identifier rubyid_get_pipeline'>get_pipeline</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:pipeline</span><span class='comma'>,</span> <span class='id identifier rubyid_default_pipeline'>default_pipeline</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:first</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:to_sym</span><span class='rparen'>)</span>
+ <span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
@@ -528,10 +530,36 @@
<tr>
<td>
<pre class="lines">
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
44
45
46
47
48
@@ -609,39 +637,14 @@
120
121
122
123
124
-125
-126
-127
-128
-129
-130
-131
-132
-133
-134
-135
-136
-137
-138
-139
-140
-141
-142
-143
-144
-145
-146
-147
-148
-149
-150</pre>
+125</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/mbrao/rendering_engines/html_pipeline.rb', line 44</span>
+ <pre class="code"><span class="info file"># File 'lib/mbrao/rendering_engines/html_pipeline.rb', line 18</span>
<span class='kw'>class</span> <span class='const'>HtmlPipeline</span> <span class='op'><</span> <span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>RenderingEngines</span><span class='op'>::</span><span class='const'>Base</span>
<span class='id identifier rubyid_attr_accessor'>attr_accessor</span> <span class='symbol'>:default_pipeline</span>
<span class='id identifier rubyid_attr_accessor'>attr_accessor</span> <span class='symbol'>:default_options</span>
@@ -657,11 +660,11 @@
<span class='kw'>begin</span>
<span class='id identifier rubyid_create_pipeline'>create_pipeline</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_get_body'>get_body</span><span class='lparen'>(</span><span class='id identifier rubyid_content'>content</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='symbol'>:output</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
<span class='kw'>rescue</span> <span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Exceptions</span><span class='op'>::</span><span class='const'>UnavailableLocalization</span> <span class='op'>=></span> <span class='id identifier rubyid_le'>le</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='id identifier rubyid_le'>le</span>
<span class='kw'>rescue</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
- <span class='id identifier rubyid_raise'>raise</span> <span class='op'>::</span><span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Exceptions</span><span class='op'>::</span><span class='const'>Rendering</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_raise'>raise</span> <span class='op'>::</span><span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Exceptions</span><span class='op'>::</span><span class='const'>Rendering</span><span class='comma'>,</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
<span class='kw'>end</span>
<span class='kw'>end</span>
<span class='comment'># Gets the default pipeline.
</span> <span class='comment'>#
@@ -672,11 +675,11 @@
<span class='comment'># Sets the default pipeline.
</span> <span class='comment'>#
</span> <span class='comment'># @return [Array] The default pipeline.
</span> <span class='kw'>def</span> <span class='id identifier rubyid_default_pipeline='>default_pipeline=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
- <span class='ivar'>@default_pipeline</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='op'>|</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span> <span class='rbrace'>}</span> <span class='rbrace'>}</span>
+ <span class='ivar'>@default_pipeline</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='op'>|</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span> <span class='rbrace'>}</span> <span class='rbrace'>}</span>
<span class='kw'>end</span>
<span class='comment'># Gets the default options.
</span> <span class='comment'>#
</span> <span class='comment'># @return [Hash] The default options.
@@ -690,65 +693,66 @@
</span> <span class='kw'>def</span> <span class='id identifier rubyid_default_options='>default_options=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
<span class='ivar'>@default_options</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_ensure_hash'>ensure_hash</span>
<span class='kw'>end</span>
<span class='id identifier rubyid_private'>private</span>
- <span class='comment'># Sanitizes options.
-</span> <span class='comment'>#
-</span> <span class='comment'># @param options [Hash] The options to sanitize.
-</span> <span class='comment'># @return [Hash] The sanitized options.
-</span> <span class='kw'>def</span> <span class='id identifier rubyid_sanitize_options'>sanitize_options</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_ensure_hash'>ensure_hash</span><span class='lparen'>(</span><span class='symbol'>:symbols</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='id identifier rubyid_filter_filters'>filter_filters</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline_options</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default_options'>default_options</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline_options</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_ensure_hash'>ensure_hash</span><span class='lparen'>(</span><span class='symbol'>:symbols</span><span class='rparen'>)</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_options'>options</span>
- <span class='kw'>end</span>
+ <span class='comment'># Sanitizes options.
+</span> <span class='comment'>#
+</span> <span class='comment'># @param options [Hash] The options to sanitize.
+</span> <span class='comment'># @return [Hash] The sanitized options.
+</span> <span class='kw'>def</span> <span class='id identifier rubyid_sanitize_options'>sanitize_options</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_ensure_hash'>ensure_hash</span><span class='lparen'>(</span><span class='symbol'>:symbols</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='id identifier rubyid_filter_filters'>filter_filters</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline_options</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_default_options'>default_options</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline_options</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_ensure_hash'>ensure_hash</span><span class='lparen'>(</span><span class='symbol'>:symbols</span><span class='rparen'>)</span><span class='rparen'>)</span>
- <span class='comment'># Get body of a content.
-</span> <span class='comment'>#
-</span> <span class='comment'># @param content [Content|String] The content to sanitize.
-</span> <span class='comment'># @param options [Hash] A list of options for renderer.
-</span> <span class='comment'># @return [Array] The body to parse.
-</span> <span class='kw'>def</span> <span class='id identifier rubyid_get_body'>get_body</span><span class='lparen'>(</span><span class='id identifier rubyid_content'>content</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_content'>content</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Content</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_content'>content</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_content'>content</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Content</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_content'>content</span><span class='period'>.</span><span class='id identifier rubyid_get_body'>get_body</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:locales</span><span class='comma'>,</span> <span class='op'>::</span><span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Parser</span><span class='period'>.</span><span class='id identifier rubyid_locale'>locale</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='rparen'>)</span>
- <span class='kw'>end</span>
+ <span class='id identifier rubyid_options'>options</span>
+ <span class='kw'>end</span>
- <span class='comment'># Creates the pipeline for rendering.
-</span> <span class='comment'>#
-</span> <span class='comment'># @param options [Hash] A list of options for renderer.
-</span> <span class='comment'># @param context [Hash] A context for rendering.
-</span> <span class='comment'># @return [HTML::Pipeline] The pipeline
-</span> <span class='kw'>def</span> <span class='id identifier rubyid_create_pipeline'>create_pipeline</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
- <span class='op'>::</span><span class='const'>HTML</span><span class='op'>::</span><span class='const'>Pipeline</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
- <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_find_class'>find_class</span><span class='lparen'>(</span><span class='id identifier rubyid_f'>f</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>::HTML::Pipeline::%CLASS%Filter</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='comma'>,</span>
- <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline_options</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_context'>context</span><span class='rparen'>)</span>
- <span class='rparen'>)</span>
- <span class='kw'>end</span>
+ <span class='comment'># Get body of a content.
+</span> <span class='comment'>#
+</span> <span class='comment'># @param content [Content|String] The content to sanitize.
+</span> <span class='comment'># @param options [Hash] A list of options for renderer.
+</span> <span class='comment'># @return [Array] The body to parse.
+</span> <span class='kw'>def</span> <span class='id identifier rubyid_get_body'>get_body</span><span class='lparen'>(</span><span class='id identifier rubyid_content'>content</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_content'>content</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Content</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_content'>content</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_content'>content</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Content</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_content'>content</span><span class='period'>.</span><span class='id identifier rubyid_get_body'>get_body</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:locales</span><span class='comma'>,</span> <span class='op'>::</span><span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Parser</span><span class='period'>.</span><span class='id identifier rubyid_locale'>locale</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span><span class='rparen'>)</span>
+ <span class='kw'>end</span>
- <span class='comment'># Filters pipeline filters basing on the options provided.
-</span> <span class='comment'>#
-</span> <span class='comment'># @param options [Hash] The original options.
-</span> <span class='comment'># @return [Hash] The options with the new set of filters.
-</span> <span class='kw'>def</span> <span class='id identifier rubyid_filter_filters'>filter_filters</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_get_pipeline'>get_pipeline</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
+ <span class='comment'># Creates the pipeline for rendering.
+</span> <span class='comment'>#
+</span> <span class='comment'># @param options [Hash] A list of options for renderer.
+</span> <span class='comment'># @param context [Hash] A context for rendering.
+</span> <span class='comment'># @return [HTML::Pipeline] The pipeline
+</span> <span class='kw'>def</span> <span class='id identifier rubyid_create_pipeline'>create_pipeline</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
+ <span class='op'>::</span><span class='const'>HTML</span><span class='op'>::</span><span class='const'>Pipeline</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span>
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='period'>.</span><span class='id identifier rubyid_find_class'>find_class</span><span class='lparen'>(</span><span class='id identifier rubyid_f'>f</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>::HTML::Pipeline::%CLASS%Filter</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='comma'>,</span>
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline_options</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_context'>context</span><span class='rparen'>)</span>
+ <span class='rparen'>)</span>
+ <span class='kw'>end</span>
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default_pipeline'>default_pipeline</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_f'>f</span><span class='op'>|</span>
- <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span>
- <span class='kw'>end</span>
+ <span class='comment'># Filters pipeline filters basing on the options provided.
+</span> <span class='comment'>#
+</span> <span class='comment'># @param options [Hash] The original options.
+</span> <span class='comment'># @return [Hash] The options with the new set of filters.
+</span> <span class='kw'>def</span> <span class='id identifier rubyid_filter_filters'>filter_filters</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_get_pipeline'>get_pipeline</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_options'>options</span>
+ <span class='id identifier rubyid_default_pipeline'>default_pipeline</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_f'>f</span><span class='op'>|</span>
+ <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:pipeline</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_last'>last</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span>
<span class='kw'>end</span>
- <span class='comment'># Gets the pipeline for the current options.
-</span> <span class='comment'>#
-</span> <span class='comment'># @param options [Hash] The options to parse.
-</span> <span class='comment'># @return [Array] The pipeline to process.
-</span> <span class='kw'>def</span> <span class='id identifier rubyid_get_pipeline'>get_pipeline</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:pipeline</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_default_pipeline'>default_pipeline</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:first</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:to_sym</span><span class='rparen'>)</span>
- <span class='kw'>end</span>
+ <span class='id identifier rubyid_options'>options</span>
+ <span class='kw'>end</span>
+
+ <span class='comment'># Gets the pipeline for the current options.
+</span> <span class='comment'>#
+</span> <span class='comment'># @param options [Hash] The options to parse.
+</span> <span class='comment'># @return [Array] The pipeline to process.
+</span> <span class='kw'>def</span> <span class='id identifier rubyid_get_pipeline'>get_pipeline</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='symbol'>:pipeline</span><span class='comma'>,</span> <span class='id identifier rubyid_default_pipeline'>default_pipeline</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:first</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:to_sym</span><span class='rparen'>)</span>
+ <span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
@@ -836,36 +840,36 @@
<tr>
<td>
<pre class="lines">
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64</pre>
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/mbrao/rendering_engines/html_pipeline.rb', line 53</span>
+ <pre class="code"><span class="info file"># File 'lib/mbrao/rendering_engines/html_pipeline.rb', line 27</span>
<span class='kw'>def</span> <span class='id identifier rubyid_render'>render</span><span class='lparen'>(</span><span class='id identifier rubyid_content'>content</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='id identifier rubyid_context'>context</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
<span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='id identifier rubyid_sanitize_options'>sanitize_options</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
<span class='id identifier rubyid_context'>context</span> <span class='op'>=</span> <span class='id identifier rubyid_context'>context</span><span class='period'>.</span><span class='id identifier rubyid_ensure_hash'>ensure_hash</span><span class='lparen'>(</span><span class='symbol'>:symbols</span><span class='rparen'>)</span>
<span class='kw'>begin</span>
<span class='id identifier rubyid_create_pipeline'>create_pipeline</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_get_body'>get_body</span><span class='lparen'>(</span><span class='id identifier rubyid_content'>content</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='symbol'>:output</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
<span class='kw'>rescue</span> <span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Exceptions</span><span class='op'>::</span><span class='const'>UnavailableLocalization</span> <span class='op'>=></span> <span class='id identifier rubyid_le'>le</span>
<span class='id identifier rubyid_raise'>raise</span> <span class='id identifier rubyid_le'>le</span>
<span class='kw'>rescue</span> <span class='op'>=></span> <span class='id identifier rubyid_e'>e</span>
- <span class='id identifier rubyid_raise'>raise</span> <span class='op'>::</span><span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Exceptions</span><span class='op'>::</span><span class='const'>Rendering</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
+ <span class='id identifier rubyid_raise'>raise</span> <span class='op'>::</span><span class='const'>Mbrao</span><span class='op'>::</span><span class='const'>Exceptions</span><span class='op'>::</span><span class='const'>Rendering</span><span class='comma'>,</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
<span class='kw'>end</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
@@ -874,10 +878,10 @@
</div>
</div>
<div id="footer">
- Generated on Wed Apr 9 21:36:01 2014 by
+ Generated on Sun May 11 18:17:19 2014 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.4 (ruby-2.1.0).
</div>
</body>
\ No newline at end of file