Class: LibRubyParser::Nodes::OpAsgn

Inherits:
LibRubyParser::Node show all
Defined in:
lib/lib-ruby-parser/nodes.rb

Overview

Represents an operation with assignment (e.g. a += 1)

Instance Attribute Summary collapse

Instance Attribute Details

#expression_lLoc (readonly)

Location of the operator

a.b <<= c
~~~~~~~~~

Returns:



3089
3090
3091
# File 'lib/lib-ruby-parser/nodes.rb', line 3089

def expression_l
  @expression_l
end

#operatorString (readonly)

Operator, can be one of:

  1. +=
  2. -=
  3. *=
  4. /=
  5. |=
  6. &=
  7. >>=
  8. <<=
  9. %=
  10. ^=
  11. **=

Returns:

  • (String)


3067
3068
3069
# File 'lib/lib-ruby-parser/nodes.rb', line 3067

def operator
  @operator
end

#operator_lLoc (readonly)

Location of the operator

a.b <<= c
    ~~~

Returns:



3080
3081
3082
# File 'lib/lib-ruby-parser/nodes.rb', line 3080

def operator_l
  @operator_l
end

#recvNode (readonly)

Left hand statement of the assignment

Returns:



3052
3053
3054
# File 'lib/lib-ruby-parser/nodes.rb', line 3052

def recv
  @recv
end

#valueNode (readonly)

Right hand statement of the assignment

Returns:



3071
3072
3073
# File 'lib/lib-ruby-parser/nodes.rb', line 3071

def value
  @value
end