class YARP::InstanceVariableReadNode
Represents referencing an instance variable.
@foo ^^^^
Attributes
name[R]
attr_reader name: Symbol
Public Class Methods
new(name, location)
click to toggle source
def initialize: (name: Symbol, location: Location
) -> void
# File yarp/node.rb, line 5644 def initialize(name, location) @name = name @location = location end
Public Instance Methods
accept(visitor)
click to toggle source
def accept: (visitor: Visitor
) -> void
# File yarp/node.rb, line 5650 def accept(visitor) visitor.visit_instance_variable_read_node(self) end
child_nodes()
click to toggle source
def child_nodes
: () -> Array[nil | Node]
# File yarp/node.rb, line 5655 def child_nodes [] end
Also aliased as: deconstruct
comment_targets()
click to toggle source
def comment_targets
: () -> Array[Node | Location]
# File yarp/node.rb, line 5660 def comment_targets [] end
copy(**params)
click to toggle source
def copy: (**params) -> InstanceVariableReadNode
# File yarp/node.rb, line 5665 def copy(**params) InstanceVariableReadNode.new( params.fetch(:name) { name }, params.fetch(:location) { location }, ) end
deconstruct_keys(keys)
click to toggle source
inspect(inspector = NodeInspector.new)
click to toggle source
# File yarp/node.rb, line 5680 def inspect(inspector = NodeInspector.new) inspector << inspector.header(self) inspector << "└── name: #{name.inspect}\n" inspector.to_str end