Class: CodeTools::AST::VariableAccess

Inherits:
Node
  • Object
show all
Defined in:
lib/rubinius/code/ast/variables.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph, #attributes, #bytecode, #children, #defined, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, #or_bytecode, #pos, #set_child, #to_sexp, transform, #transform, transform_comment, transform_kind, transform_kind=, transform_name, #visit, #walk

Constructor Details

#initialize(line, name) ⇒ VariableAccess

Returns a new instance of VariableAccess.



107
108
109
110
# File 'lib/rubinius/code/ast/variables.rb', line 107

def initialize(line, name)
  @line = line
  @name = name
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



105
106
107
# File 'lib/rubinius/code/ast/variables.rb', line 105

def name
  @name
end

Instance Method Details

#value_defined(g, f) ⇒ Object



112
113
114
115
# File 'lib/rubinius/code/ast/variables.rb', line 112

def value_defined(g, f)
  variable_defined(g, f)
  bytecode(g)
end