Class: TRuby::IR::ModuleDecl
Overview
Module declaration
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#name ⇒ Object
Returns the value of attribute name.
Attributes inherited from Node
#location, #metadata, #type_info
Instance Method Summary collapse
- #children ⇒ Object
-
#initialize(name:, body: [], **opts) ⇒ ModuleDecl
constructor
A new instance of ModuleDecl.
Methods inherited from Node
Constructor Details
#initialize(name:, body: [], **opts) ⇒ ModuleDecl
Returns a new instance of ModuleDecl.
118 119 120 121 122 |
# File 'lib/t_ruby/ir.rb', line 118 def initialize(name:, body: [], **opts) super(**opts) @name = name @body = body end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
116 117 118 |
# File 'lib/t_ruby/ir.rb', line 116 def body @body end |
#name ⇒ Object
Returns the value of attribute name.
116 117 118 |
# File 'lib/t_ruby/ir.rb', line 116 def name @name end |
Instance Method Details
#children ⇒ Object
124 125 126 |
# File 'lib/t_ruby/ir.rb', line 124 def children @body end |