Sha256: 31737aba583354396200a12977604b547b4fc1f8e583334a6785f002fee461dd
Contents?: true
Size: 1.57 KB
Versions: 6
Compression:
Stored size: 1.57 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>extend_object (PluginFactory)</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/pluginfactory.rb, line 124</span> 124: <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">obj</span> ) 125: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">is_a?</span>( <span class="ruby-constant">Class</span> ) 126: <span class="ruby-identifier">raise</span> <span class="ruby-constant">TypeError</span>, <span class="ruby-node">"Cannot extend a #{obj.class.name}"</span>, <span class="ruby-identifier">caller</span>(<span class="ruby-value">1</span>) 127: <span class="ruby-keyword kw">end</span> 128: <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">instance_variable_set</span>( <span class="ruby-identifier">:@derivatives</span>, {} ) 129: <span class="ruby-keyword kw">super</span> 130: <span class="ruby-keyword kw">end</span></pre> </body> </html>
Version data entries
6 entries across 6 versions & 1 rubygems