Kernel.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <!DOCTYPE html
  3. PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  4. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  5. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  6. <head>
  7. <title>Module: Kernel</title>
  8. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  9. <meta http-equiv="Content-Script-Type" content="text/javascript" />
  10. <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  11. <script type="text/javascript">
  12. // <![CDATA[
  13. function popupCode( url ) {
  14. window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  15. }
  16. function toggleCode( id ) {
  17. if ( document.getElementById )
  18. elem = document.getElementById( id );
  19. else if ( document.all )
  20. elem = eval( "document.all." + id );
  21. else
  22. return false;
  23. elemStyle = elem.style;
  24. if ( elemStyle.display != "block" ) {
  25. elemStyle.display = "block"
  26. } else {
  27. elemStyle.display = "none"
  28. }
  29. return true;
  30. }
  31. // Make codeblocks hidden by default
  32. document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  33. // ]]>
  34. </script>
  35. </head>
  36. <body>
  37. <div id="classHeader">
  38. <table class="header-table">
  39. <tr class="top-aligned-row">
  40. <td><strong>Module</strong></td>
  41. <td class="class-name-in-header">Kernel</td>
  42. </tr>
  43. <tr class="top-aligned-row">
  44. <td><strong>In:</strong></td>
  45. <td>
  46. <a href="../files/erubis/util_rb.html">
  47. erubis/util.rb
  48. </a>
  49. <br />
  50. </td>
  51. </tr>
  52. </table>
  53. </div>
  54. <!-- banner header -->
  55. <div id="bodyContent">
  56. <div id="contextContent">
  57. <div id="description">
  58. <p>
  59. $Release: 2.7.0 $ copyright(c) 2006-2011 kuwata-lab.com all rights reserved.
  60. </p>
  61. </div>
  62. </div>
  63. <div id="method-list">
  64. <h3 class="section-bar">Methods</h3>
  65. <div class="name-list">
  66. <a href="#M000239">not_implemented</a>&nbsp;&nbsp;
  67. </div>
  68. </div>
  69. </div>
  70. <!-- if includes -->
  71. <div id="section">
  72. <!-- if method_list -->
  73. <div id="methods">
  74. <h3 class="section-bar">Private Instance methods</h3>
  75. <div id="method-M000239" class="method-detail">
  76. <a name="M000239"></a>
  77. <div class="method-heading">
  78. <a href="#M000239" class="method-signature">
  79. <span class="method-name">not_implemented</span><span class="method-args">(</span>
  80. </a>
  81. </div>
  82. <div class="method-description">
  83. <p>
  84. raise NotImplementedError
  85. </p>
  86. <p><a class="source-toggle" href="#"
  87. onclick="toggleCode('M000239-source');return false;">[Source]</a></p>
  88. <div class="method-source-code" id="M000239-source">
  89. <pre>
  90. <span class="ruby-comment cmt"># File erubis/util.rb, line 11</span>
  91. <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">not_implemented</span> <span class="ruby-comment cmt">#:doc:</span>
  92. <span class="ruby-identifier">backtrace</span> = <span class="ruby-identifier">caller</span>()
  93. <span class="ruby-identifier">method_name</span> = (<span class="ruby-identifier">backtrace</span>.<span class="ruby-identifier">shift</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/`(\w+)'$/</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">$1</span>
  94. <span class="ruby-identifier">mesg</span> = <span class="ruby-node">&quot;class #{self.class.name} must implement abstract method '#{method_name}()'.&quot;</span>
  95. <span class="ruby-comment cmt">#mesg = &quot;#{self.class.name}##{method_name}() is not implemented.&quot;</span>
  96. <span class="ruby-identifier">err</span> = <span class="ruby-constant">NotImplementedError</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">mesg</span>
  97. <span class="ruby-identifier">err</span>.<span class="ruby-identifier">set_backtrace</span> <span class="ruby-identifier">backtrace</span>
  98. <span class="ruby-identifier">raise</span> <span class="ruby-identifier">err</span>
  99. <span class="ruby-keyword kw">end</span>
  100. </pre>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. <div id="validator-badges">
  107. <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
  108. </div>
  109. </body>
  110. </html>