Class: TRuby::IR::ClassDecl
Overview
Class declaration
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#implements ⇒ Object
Returns the value of attribute implements.
-
#name ⇒ Object
Returns the value of attribute name.
-
#superclass ⇒ Object
Returns the value of attribute superclass.
-
#type_params ⇒ Object
Returns the value of attribute type_params.
Attributes inherited from Node
#location, #metadata, #type_info
Instance Method Summary collapse
- #children ⇒ Object
-
#initialize(name:, superclass: nil, implements: [], type_params: [], body: [], **opts) ⇒ ClassDecl
constructor
A new instance of ClassDecl.
Methods inherited from Node
Constructor Details
#initialize(name:, superclass: nil, implements: [], type_params: [], body: [], **opts) ⇒ ClassDecl
Returns a new instance of ClassDecl.
88 89 90 91 92 93 94 95 |
# File 'lib/t_ruby/ir.rb', line 88 def initialize(name:, superclass: nil, implements: [], type_params: [], body: [], **opts) super(**opts) @name = name @superclass = superclass @implements = implements @type_params = type_params @body = body end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
86 87 88 |
# File 'lib/t_ruby/ir.rb', line 86 def body @body end |
#implements ⇒ Object
Returns the value of attribute implements.
86 87 88 |
# File 'lib/t_ruby/ir.rb', line 86 def implements @implements end |
#name ⇒ Object
Returns the value of attribute name.
86 87 88 |
# File 'lib/t_ruby/ir.rb', line 86 def name @name end |
#superclass ⇒ Object
Returns the value of attribute superclass.
86 87 88 |
# File 'lib/t_ruby/ir.rb', line 86 def superclass @superclass end |
#type_params ⇒ Object
Returns the value of attribute type_params.
86 87 88 |
# File 'lib/t_ruby/ir.rb', line 86 def type_params @type_params end |
Instance Method Details
#children ⇒ Object
97 98 99 |
# File 'lib/t_ruby/ir.rb', line 97 def children @body end |