Class: TRuby::IR::ModuleDecl

Inherits:
Node
  • Object
show all
Defined in:
lib/t_ruby/ir.rb

Overview

Module declaration

Instance Attribute Summary collapse

Attributes inherited from Node

#location, #metadata, #type_info

Instance Method Summary collapse

Methods inherited from Node

#accept, #transform

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

#bodyObject

Returns the value of attribute body.



116
117
118
# File 'lib/t_ruby/ir.rb', line 116

def body
  @body
end

#nameObject

Returns the value of attribute name.



116
117
118
# File 'lib/t_ruby/ir.rb', line 116

def name
  @name
end

Instance Method Details

#childrenObject



124
125
126
# File 'lib/t_ruby/ir.rb', line 124

def children
  @body
end