Sha256: 0a0a8840abde200af96d8cf6fd542edede656f64e73fec2868e672e678743212
Contents?: true
Size: 1.65 KB
Versions: 2
Compression:
Stored size: 1.65 KB
Contents
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <!-- defval (RQ::Util) --> <html> <head> <title>defval (RQ::Util)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="http://www.FaerieMUD.org/stylesheets/rdoc.css" type="text/css" /> </head> <body> <pre><span class="ruby-comment cmt"># File lib/rq-2.3.1/util.rb, line 272</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">defval</span> <span class="ruby-identifier">var</span>, <span class="ruby-identifier">default</span> = <span class="ruby-keyword kw">nil</span> <span class="ruby-comment cmt">#--{{{</span> <span class="ruby-identifier">v</span> = <span class="ruby-node">"#{ var }"</span> <span class="ruby-identifier">c</span> = <span class="ruby-node">"DEFAULT_#{ v }"</span>.<span class="ruby-identifier">upcase</span> <span class="ruby-keyword kw">begin</span> <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">v</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">const_get</span>(<span class="ruby-identifier">c</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">NameError</span> <span class="ruby-identifier">default</span> <span class="ruby-keyword kw">end</span> <span class="ruby-comment cmt">#--}}}</span> <span class="ruby-keyword kw">end</span></pre> </body> </html>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rq-3.0.0 | doc/classes/RQ/Util.src/M000065.html |
rq-3.1.0 | doc/classes/RQ/Util.src/M000065.html |