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.



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

#bodyObject

Returns the value of attribute body.



104
105
106
# File 'lib/t_ruby/ir.rb', line 104

def body
  @body
end

#nameObject

Returns the value of attribute name.



104
105
106
# File 'lib/t_ruby/ir.rb', line 104

def name
  @name
end

Instance Method Details

#childrenObject



112
113
114
# File 'lib/t_ruby/ir.rb', line 112

def children
  @body
end