Package org.jruby.ast

Class AttrAssignNode

java.lang.Object
org.jruby.ast.Node
org.jruby.ast.AttrAssignNode
All Implemented Interfaces:
IArgumentNode, INameNode

public class AttrAssignNode extends Node implements INameNode, IArgumentNode
Node that represents an assignment of either an array element or attribute.
  • Field Details

    • receiverNode

      protected final Node receiverNode
  • Constructor Details

    • AttrAssignNode

      public AttrAssignNode(int line, Node receiverNode, RubySymbol name, Node argsNode, Node blockNode, boolean isLazy)
  • Method Details

    • getNodeType

      public NodeType getNodeType()
      Specified by:
      getNodeType in class Node
      Returns:
      the nodeId
    • accept

      public <T> T accept(NodeVisitor<T> visitor)
      Accept for the visitor pattern.
      Specified by:
      accept in class Node
      Parameters:
      visitor - the visitor
    • getName

      public RubySymbol getName()
      Gets the name. name is the name of the method called
      Specified by:
      getName in interface INameNode
      Returns:
      name
    • getReceiverNode

      public Node getReceiverNode()
      Gets the receiverNode. receiverNode is the object on which the method is being called
      Returns:
      receiverNode
    • getArgsNode

      public Node getArgsNode()
      Gets the argsNode. argsNode representing the method's arguments' value for this call.
      Specified by:
      getArgsNode in interface IArgumentNode
      Returns:
      argsNode
    • getBlockNode

      public Node getBlockNode()
    • setArgsNode

      public Node setArgsNode(Node argsNode)
      Set the argsNode
      Specified by:
      setArgsNode in interface IArgumentNode
      Parameters:
      argsNode - set the arguments for this node.
    • isLazy

      public boolean isLazy()
    • childNodes

      public List<Node> childNodes()
      Specified by:
      childNodes in class Node