Sha256: 93df513d09cb29e419b5521fe0c085180a96660532302b6e9e0c6ec4e8de8120
Contents?: true
Size: 1.68 KB
Versions: 3
Compression:
Stored size: 1.68 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>attr_checker (Module)</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 lib/facet/module/attr_checker.rb, line 18</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attr_checker</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>) <span class="ruby-identifier">made</span> = [] <span class="ruby-identifier">args</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">a</span> = <span class="ruby-identifier">a</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">strip</span>.<span class="ruby-identifier">chomp</span>(<span class="ruby-value str">'?'</span>) <span class="ruby-identifier">module_eval</span> <span class="ruby-node">%Q{ def #{a}?; @#{a} ? true : @#{a}; end }</span> <span class="ruby-identifier">made</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{a}?"</span>.<span class="ruby-identifier">to_sym</span> } <span class="ruby-keyword kw">return</span> <span class="ruby-operator">*</span><span class="ruby-identifier">made</span> <span class="ruby-keyword kw">end</span></pre> </body> </html>
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
facets-0.7.0 | doc/atomic-rdoc/classes/Module.src/M000148.html |
facets-0.7.1 | doc/atomic-rdoc/classes/Module.src/M000148.html |
facets-0.7.2 | doc/atomic-rdoc/classes/Module.src/M000150.html |