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.
1065 1066 1067 1068 1069 |
# File 'lib/rubinius/code/ast/definitions.rb', line 1065 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.
1063 1064 1065 |
# File 'lib/rubinius/code/ast/definitions.rb', line 1063 def receiver @receiver end |
Instance Method Details
#bytecode(g) ⇒ Object
1071 1072 1073 1074 1075 |
# File 'lib/rubinius/code/ast/definitions.rb', line 1071 def bytecode(g) pos(g) @receiver.bytecode(g) @body.bytecode(g) end |
#to_sexp ⇒ Object
1077 1078 1079 |
# File 'lib/rubinius/code/ast/definitions.rb', line 1077 def to_sexp [:sclass, @receiver.to_sexp, @body.to_sexp] end |