Sha256: ab3dcb30ac8bbe5ef0367290b6c059cc315515ebcf709567c093a8eee6e34ea5
Contents?: true
Size: 1.92 KB
Versions: 6
Compression:
Stored size: 1.92 KB
Contents
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>generate_html_result (WebT2App)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> <pre><span class="ruby-comment cmt"># File pkg/t2-web-0.0.2/bin/web_t2_service.rb, line 100</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">generate_html_result</span>(<span class="ruby-identifier">data</span>) <span class="ruby-identifier">html</span> = <span class="ruby-value str">""</span> <span class="ruby-comment cmt">#p data</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">instance_of?</span> <span class="ruby-constant">Array</span> <span class="ruby-identifier">html</span> = <span class="ruby-identifier">data</span>.<span class="ruby-identifier">flatten</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'<br>'</span>) <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">data</span>.<span class="ruby-identifier">instance_of?</span> <span class="ruby-constant">String</span> <span class="ruby-identifier">html</span> = <span class="ruby-identifier">data</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/[\n]/</span>, <span class="ruby-value str">'<br>'</span>) <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">html</span> = <span class="ruby-identifier">data</span> <span class="ruby-keyword kw">end</span> <span class="ruby-identifier">html</span> <span class="ruby-keyword kw">end</span></pre> </body> </html>
Version data entries
6 entries across 6 versions & 1 rubygems