Class: Node::OP_ASGN_AND
- Defined in:
- ext/internal/node/nodeinfo.c,
ext/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.4/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.4/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.5/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.5/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.6/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.6/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.7/internal/node/nodeinfo.c,
ext/cached/ruby-1.8.7/internal/node/nodeinfo.c,
ext/cached/ruby-1.9.1/internal/node/nodeinfo.c,
ext/cached/ruby-1.9.1/internal/node/nodeinfo.c,
ext/cached/ruby-1.9.2/internal/node/nodeinfo.c,
ext/cached/ruby-1.9.2/internal/node/nodeinfo.c,
ext/cached/ruby-1.9.3/internal/node/nodeinfo.c,
ext/cached/ruby-1.9.3/internal/node/nodeinfo.c
Overview
Represents an expression of the form:
recv &&= value
Ruby will evaluate the expression on the left hand side of the assignment; if it is true, then it will assign the result of the expression on the right hand side to the receiver on the left hand side.
Class Method Summary collapse
-
.members ⇒ Array
Return an array of strings containing the names of the node class’s members.
Instance Method Summary collapse
-
#recv ⇒ Object
Return the Node’s recv member.
-
#value ⇒ Object
Return the Node’s value member.
Methods inherited from Node
#[], #_dump, _load, #address, #bytecode_compile, compile_string, #eval, #flags, #inspect, #members, #nd_file, #nd_line, #nd_type, #obfusc, #pretty_print, #swap, #to_a, #tree, type
Class Method Details
.members ⇒ Array
Return an array of strings containing the names of the node class’s members.
2793 2794 2795 2796 |
# File 'ext/internal/node/nodeinfo.c', line 2793 VALUE node_s_members(VALUE klass) { return rb_iv_get(klass, "__member__"); } |
Instance Method Details
#recv ⇒ Object
Return the Node’s recv member. The return type is either a Node or an Object.
2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 |
# File 'ext/internal/node/nodeinfo.c', line 2511 static VALUE node_recv(VALUE self) { NODE * n; Data_Get_Struct(self, NODE, n); if(TYPE(n->nd_recv) == T_NODE) { if(0 && nd_type(n) == NODE_OP_ASGN2) { return wrap_node_as( (NODE *)n->nd_recv, rb_cNodeSubclass[NODE_OP_ASGN2_ARG]); } else { return wrap_node((NODE *)n->nd_recv); } } else { return (VALUE)n->nd_recv; } } |
#value ⇒ Object
Return the Node’s value member. The return type is either a Node or an Object.
2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 |
# File 'ext/internal/node/nodeinfo.c', line 2714 static VALUE node_value(VALUE self) { NODE * n; Data_Get_Struct(self, NODE, n); if(TYPE(n->nd_value) == T_NODE) { if(0 && nd_type(n) == NODE_OP_ASGN2) { return wrap_node_as( (NODE *)n->nd_value, rb_cNodeSubclass[NODE_OP_ASGN2_ARG]); } else { return wrap_node((NODE *)n->nd_value); } } else { return (VALUE)n->nd_value; } } |