mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-12 06:38:45 +01:00
120 lines
4.7 KiB
HTML
120 lines
4.7 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
|
|
<title>Class Class – Wren</title>
|
|
<link rel="stylesheet" type="text/css" href="../../style.css" />
|
|
<link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,400italic,700italic|Source+Code+Pro:400|Lato:400|Sanchez:400italic,400' rel='stylesheet' type='text/css'>
|
|
<!-- Tell mobile browsers we're optimized for them and they don't need to crop
|
|
the viewport. -->
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
|
|
</head>
|
|
<body id="top" class="module">
|
|
<header>
|
|
<div class="page">
|
|
<div class="main-column">
|
|
<h1><a href="../../">wren</a></h1>
|
|
<h2>a classy little scripting language</h2>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<div class="page">
|
|
<nav class="big">
|
|
<a href="./"><img src="../../wren.svg" class="logo"></a>
|
|
<ul>
|
|
<li><a href="../">Modules</a></li>
|
|
<li><a href="./">core</a></li>
|
|
</ul>
|
|
<section>
|
|
<h2>core classes</h2>
|
|
<ul>
|
|
<li><a href="bool.html">Bool</a></li>
|
|
<li><a href="class.html">Class</a></li>
|
|
<li><a href="fiber.html">Fiber</a></li>
|
|
<li><a href="fn.html">Fn</a></li>
|
|
<li><a href="list.html">List</a></li>
|
|
<li><a href="map.html">Map</a></li>
|
|
<li><a href="null.html">Null</a></li>
|
|
<li><a href="num.html">Num</a></li>
|
|
<li><a href="object.html">Object</a></li>
|
|
<li><a href="range.html">Range</a></li>
|
|
<li><a href="sequence.html">Sequence</a></li>
|
|
<li><a href="string.html">String</a></li>
|
|
<li><a href="system.html">System</a></li>
|
|
</ul>
|
|
</section>
|
|
</nav>
|
|
<nav class="small">
|
|
<table>
|
|
<tr>
|
|
<td><a href="../">Modules</a></td>
|
|
<td><a href="./">core</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2"><h2>core classes</h2></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<ul>
|
|
<li><a href="bool.html">Bool</a></li>
|
|
<li><a href="class.html">Class</a></li>
|
|
<li><a href="fiber.html">Fiber</a></li>
|
|
<li><a href="fn.html">Fn</a></li>
|
|
<li><a href="list.html">List</a></li>
|
|
<li><a href="map.html">Map</a></li>
|
|
<li><a href="null.html">Null</a></li>
|
|
</ul>
|
|
</td>
|
|
<td>
|
|
<ul>
|
|
<li><a href="num.html">Num</a></li>
|
|
<li><a href="object.html">Object</a></li>
|
|
<li><a href="range.html">Range</a></li>
|
|
<li><a href="sequence.html">Sequence</a></li>
|
|
<li><a href="string.html">String</a></li>
|
|
<li><a href="system.html">System</a></li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</nav>
|
|
<main>
|
|
<h1>Class Class</h1>
|
|
<p><strong>TODO</strong> </p>
|
|
<h2>Methods <a href="#methods" name="methods" class="header-anchor">#</a></h2>
|
|
<h3><strong>name</strong> <a href="#name" name="name" class="header-anchor">#</a></h3>
|
|
<p>The name of the class. </p>
|
|
<h3><strong>supertype</strong> <a href="#supertype" name="supertype" class="header-anchor">#</a></h3>
|
|
<p>The superclass of this class. </p>
|
|
<div class="codehilite"><pre><span class="k">class</span> <span class="vg">Crustacean</span> <span class="p">{}</span>
|
|
<span class="k">class</span> <span class="vg">Crab</span> <span class="k">is</span> <span class="vg">Crustacean</span> <span class="p">{}</span>
|
|
|
|
<span class="vg">System</span><span class="o">.</span><span class="n">print</span><span class="p">(</span><span class="vg">Crab</span><span class="o">.</span><span class="n">supertype</span><span class="p">)</span> <span class="output">Crustacean</span>
|
|
</pre></div>
|
|
|
|
|
|
<p>A class with no explicit superclass implicitly inherits Object: </p>
|
|
<div class="codehilite"><pre><span class="vg">System</span><span class="o">.</span><span class="n">print</span><span class="p">(</span><span class="vg">Crustacean</span><span class="o">.</span><span class="n">supertype</span><span class="p">)</span> <span class="output">Object</span>
|
|
</pre></div>
|
|
|
|
|
|
<p>Object forms the root of the class hierarchy and has no supertype: </p>
|
|
<div class="codehilite"><pre><span class="vg">System</span><span class="o">.</span><span class="n">print</span><span class="p">(</span><span class="vg">Object</span><span class="o">.</span><span class="n">supertype</span><span class="p">)</span> <span class="output">null</span>
|
|
</pre></div>
|
|
</main>
|
|
</div>
|
|
<footer>
|
|
<div class="page">
|
|
<div class="main-column">
|
|
<p>Wren lives
|
|
<a href="https://github.com/wren-lang/wren">on GitHub</a>
|
|
— Made with ❤ by
|
|
<a href="http://journal.stuffwithstuff.com/">Bob Nystrom</a> and
|
|
<a href="https://github.com/wren-lang/wren/blob/master/AUTHORS">friends</a>.
|
|
</p>
|
|
<div class="main-column">
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html>
|