Class: CodeTools::AST::SClass
- Defined in:
- lib/rubinius/code/ast/definitions.rb
Instance Attribute Summary collapse
-
#receiver ⇒ Object
Returns the value of attribute receiver.
Attributes inherited from Node
Instance Method Summary collapse
- #bytecode(g) ⇒ Object
-
#initialize(line, receiver, body) ⇒ SClass
constructor
A new instance of SClass.
- #to_sexp ⇒ Object
Methods inherited from Node
#ascii_graph, #attributes, #children, #defined, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, #or_bytecode, #pos, #set_child, #transform, transform, transform_comment, transform_kind, transform_kind=, transform_name, #value_defined, #visit, #walk
Constructor Details
#initialize(line, receiver, body) ⇒ SClass
Returns a new instance of SClass.
1077 1078 1079 1080 1081 |
# File 'lib/rubinius/code/ast/definitions.rb', line 1077 def initialize(line, receiver, body) @line = line @receiver = receiver @body = SClassScope.new line, body end |
Instance Attribute Details
#receiver ⇒ Object
Returns the value of attribute receiver.
1075 1076 1077 |
# File 'lib/rubinius/code/ast/definitions.rb', line 1075 def receiver @receiver end |
Instance Method Details
#bytecode(g) ⇒ Object
1083 1084 1085 1086 1087 |
# File 'lib/rubinius/code/ast/definitions.rb', line 1083 def bytecode(g) pos(g) @receiver.bytecode(g) @body.bytecode(g) end |
#to_sexp ⇒ Object
1089 1090 1091 |
# File 'lib/rubinius/code/ast/definitions.rb', line 1089 def to_sexp [:sclass, @receiver.to_sexp, @body.to_sexp] end |