</p>
<p>Use this to add value-constants to the class/module name hierarchy.  For example:</p>
<pre><code class="language-swift">let defaultInvader = RbObject(ofClass: &quot;Invader&quot;, kwArgs: [&quot;name&quot; : &quot;Zaltor&quot;])
try Ruby.setConstant(&quot;Game::Invaders::DEFAULT&quot;, defaultInvader)
</code></pre>
<p>To define new classes and modules, use <a href="../types/rbgateway1.html?swift#defineclass_underinitializer"><code>RbGateway.defineClass(...)</code></a> and
<a href="../types/rbgateway