doc/atomic-rdoc/classes/Module.src/M000143.html in facets-0.7.1 vs doc/atomic-rdoc/classes/Module.src/M000143.html in facets-0.7.2

- old
+ new

@@ -3,27 +3,18 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> - <title>include_as (Module)</title> + <title>abstract (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/include_as.rb, line 6</span> - <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">include_as</span>( <span class="ruby-identifier">h</span> ) - <span class="ruby-identifier">h</span>.<span class="ruby-identifier">each</span>{ <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">mod</span><span class="ruby-operator">|</span> - <span class="ruby-identifier">s</span> = <span class="ruby-keyword kw">self</span> - <span class="ruby-identifier">c</span> = <span class="ruby-constant">Class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">SimpleDelegator</span>) { - <span class="ruby-identifier">include</span> <span class="ruby-identifier">mod</span> - <span class="ruby-identifier">define_method</span>(<span class="ruby-identifier">:initialize</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">s</span>) } - } - <span class="ruby-identifier">class_eval</span> { - <span class="ruby-identifier">define_method</span>( <span class="ruby-identifier">name</span> ) { - <span class="ruby-identifier">instance_variable_set</span>( <span class="ruby-node">&quot;@#{name}&quot;</span>, <span class="ruby-identifier">instance_variable_get</span>( <span class="ruby-node">&quot;@#{name}&quot;</span> ) <span class="ruby-operator">||</span> <span class="ruby-identifier">c</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">s</span>) ) - } - } + <pre><span class="ruby-comment cmt"># File lib/facet/module/abstract.rb, line 15</span> + <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">abstract</span>( <span class="ruby-operator">*</span><span class="ruby-identifier">sym</span> ) + <span class="ruby-identifier">sym</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> + <span class="ruby-identifier">define_method</span>( <span class="ruby-identifier">s</span> ) { <span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-node">&quot;undefined abstraction ##{s}&quot;</span> } } <span class="ruby-keyword kw">end</span></pre> </body> </html> \ No newline at end of file