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.
106 107 108 109 110 |
# File 'lib/t_ruby/ir.rb', line 106 def initialize(name:, body: [], **opts) super(**opts) @name = name @body = body end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
104 105 106 |
# File 'lib/t_ruby/ir.rb', line 104 def body @body end |
#name ⇒ Object
Returns the value of attribute name.
104 105 106 |
# File 'lib/t_ruby/ir.rb', line 104 def name @name end |
Instance Method Details
#children ⇒ Object
112 113 114 |
# File 'lib/t_ruby/ir.rb', line 112 def children @body end |