<?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>extend_object (CrossCase)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style> .ruby-comment { color: green; font-style: italic } .ruby-constant { color: #4433aa; font-weight: bold; } .ruby-identifier { color: #222222; } .ruby-ivar { color: #2233dd; } .ruby-keyword { color: #3333FF; font-weight: bold } .ruby-node { color: #777777; } .ruby-operator { color: #111111; } .ruby-regexp { color: #662222; } .ruby-value { color: #662222; font-style: italic } .kw { color: #3333FF; font-weight: bold } .cmt { color: green; font-style: italic } .str { color: #662222; font-style: italic } .re { color: #662222; } </style> </head> <body bgcolor="white"> <pre><span class="ruby-comment cmt"># File lib/mega/crosscase.rb, line 109</span> <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span><span class="ruby-operator">::</span><span class="ruby-identifier">extend_object</span>( <span class="ruby-identifier">mod</span> ) <span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-value str">"Expected a Module or a Class, got a "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">mod</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">mod</span>.<span class="ruby-identifier">is_a?</span>( <span class="ruby-constant">Module</span> ) <span class="ruby-keyword kw">self</span><span class="ruby-operator">::</span><span class="ruby-identifier">transformClassMethods</span>( <span class="ruby-identifier">mod</span> ) <span class="ruby-keyword kw">self</span><span class="ruby-operator">::</span><span class="ruby-identifier">transformInstanceMethods</span>( <span class="ruby-identifier">mod</span> ) <span class="ruby-keyword kw">self</span><span class="ruby-operator">::</span><span class="ruby-identifier">installMethodHooks</span>( <span class="ruby-identifier">mod</span> ) <span class="ruby-keyword kw">end</span></pre> </body> </html>