Class: CodeTools::AST::Undef
- Defined in:
- lib/rubinius/code/ast/definitions.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Attributes inherited from Node
Instance Method Summary collapse
- #bytecode(g) ⇒ Object
-
#initialize(line, sym) ⇒ Undef
constructor
A new instance of Undef.
- #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, sym) ⇒ Undef
Returns a new instance of Undef.
48 49 50 51 |
# File 'lib/rubinius/code/ast/definitions.rb', line 48 def initialize(line, sym) @line = line @name = sym end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
46 47 48 |
# File 'lib/rubinius/code/ast/definitions.rb', line 46 def name @name end |
Instance Method Details
#bytecode(g) ⇒ Object
53 54 55 56 57 58 59 |
# File 'lib/rubinius/code/ast/definitions.rb', line 53 def bytecode(g) pos(g) g.push_scope @name.bytecode(g) g.send :__undef_method__, 1 end |
#to_sexp ⇒ Object
61 62 63 |
# File 'lib/rubinius/code/ast/definitions.rb', line 61 def to_sexp [:undef, @name.to_sexp] end |