Package org.jruby.ast
Class AttrAssignNode
java.lang.Object
org.jruby.ast.Node
org.jruby.ast.AttrAssignNode
- All Implemented Interfaces:
IArgumentNode
,INameNode
Node that represents an assignment of either an array element or attribute.
-
Field Summary
FieldsFields inherited from class org.jruby.ast.Node
containsVariableAssignment, newline
-
Constructor Summary
ConstructorsConstructorDescriptionAttrAssignNode
(int line, Node receiverNode, RubySymbol name, Node argsNode, Node blockNode, boolean isLazy) -
Method Summary
Modifier and TypeMethodDescription<T> T
accept
(NodeVisitor<T> visitor) Accept for the visitor pattern.Gets the argsNode.getName()
Gets the name.Gets the receiverNode.boolean
isLazy()
setArgsNode
(Node argsNode) Set the argsNodeMethods inherited from class org.jruby.ast.Node
containsVariableAssignment, createList, createList, createList, createList, executesOnce, getFile, getLine, getNodeName, isNewline, isNil, needsDefinitionCheck, setLine, setNewline, toString, toString, toStringExtraInfo, toStringInternal, unsetNewline
-
Field Details
-
receiverNode
-
-
Constructor Details
-
AttrAssignNode
public AttrAssignNode(int line, Node receiverNode, RubySymbol name, Node argsNode, Node blockNode, boolean isLazy)
-
-
Method Details
-
getNodeType
- Specified by:
getNodeType
in classNode
- Returns:
- the nodeId
-
accept
Accept for the visitor pattern. -
getName
Gets the name. name is the name of the method called -
getReceiverNode
Gets the receiverNode. receiverNode is the object on which the method is being called- Returns:
- receiverNode
-
getArgsNode
Gets the argsNode. argsNode representing the method's arguments' value for this call.- Specified by:
getArgsNode
in interfaceIArgumentNode
- Returns:
- argsNode
-
getBlockNode
-
setArgsNode
Set the argsNode- Specified by:
setArgsNode
in interfaceIArgumentNode
- Parameters:
argsNode
- set the arguments for this node.
-
isLazy
public boolean isLazy() -
childNodes
- Specified by:
childNodes
in classNode
-