rdoc/RubyXL/WorksheetConvenienceMethods.html in rubyXL-3.4.24 vs rdoc/RubyXL/WorksheetConvenienceMethods.html in rubyXL-3.4.25
- old
+ new
@@ -2,11 +2,11 @@
<html>
<head>
<meta charset="UTF-8">
-<title>module RubyXL::WorksheetConvenienceMethods - rubyXL 3.4.24</title>
+<title>module RubyXL::WorksheetConvenienceMethods - rubyXL 3.4.25</title>
<script type="text/javascript">
var rdoc_rel_prefix = "../";
var index_rel_prefix = "../";
</script>
@@ -196,10 +196,10 @@
<pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/worksheet.rb, line 700</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">add_validation_list</span>(<span class="ruby-identifier">ref</span>, <span class="ruby-identifier">list_arr</span>)
<span class="ruby-comment"># "Any double quote characters in the value should be escaped with another double quote.</span>
<span class="ruby-comment"># If the value does not contain a comma, newline or double quote, then the String value should be returned unchanged.</span>
<span class="ruby-comment"># If the value contains a comma, newline or double quote, then the String value should be returned enclosed in double quotes."</span>
- <span class="ruby-identifier">expr</span> = <span class="ruby-string">'"'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">list_arr</span>.<span class="ruby-identifier">collect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">str</span><span class="ruby-operator">|</span> <span class="ruby-identifier">str</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-string">'"'</span>, <span class="ruby-string">'""'</span>)}.<span class="ruby-identifier">join</span>(<span class="ruby-string">','</span>) <span class="ruby-operator">+</span> <span class="ruby-string">'"'</span>
+ <span class="ruby-identifier">expr</span> = <span class="ruby-string">'"'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">list_arr</span>.<span class="ruby-identifier">collect</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">str</span><span class="ruby-operator">|</span> <span class="ruby-identifier">str</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-string">'"'</span>, <span class="ruby-string">'""'</span>) }.<span class="ruby-identifier">join</span>(<span class="ruby-string">','</span>) <span class="ruby-operator">+</span> <span class="ruby-string">'"'</span>
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">data_validations</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">DataValidations</span>.<span class="ruby-identifier">new</span>
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">data_validations</span> <span class="ruby-operator"><<</span>
<span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">DataValidation</span>.<span class="ruby-identifier">new</span>({<span class="ruby-value">:sqref</span> <span class="ruby-operator">=></span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Reference</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">ref</span>),
<span class="ruby-value">:formula1</span> <span class="ruby-operator">=></span> <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Formula</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:expression</span> <span class="ruby-operator">=></span> <span class="ruby-identifier">expr</span>),
<span class="ruby-value">:type</span> <span class="ruby-operator">=></span> <span class="ruby-string">'list'</span>})