Sha256: 676d954a60c5a1aaf7bfdbec1b37a86a70d581214b24fdc20bbb2ae6d533dd05

Contents?: true

Size: 1.67 KB

Versions: 3

Compression:

Stored size: 1.67 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_writer (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_writer.rb, line 4</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">attr_writer</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}=(x); @#{a} = x ; end }</span>
      <span class="ruby-identifier">made</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-node">&quot;#{a}=&quot;</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/M000136.html
facets-0.7.1 doc/atomic-rdoc/classes/Module.src/M000136.html
facets-0.7.2 doc/atomic-rdoc/classes/Module.src/M000137.html