Class: LibRubyParser::Nodes::Rational

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

Overview

Represents rational literal (e.g. 1r)

Instance Attribute Summary collapse

Instance Attribute Details

#expression_lLoc (readonly)

Location of the full expression

“‘text -1r ~~~ “`

Returns:



3410
3411
3412
# File 'lib/lib-ruby-parser/nodes.rb', line 3410

def expression_l
  @expression_l
end

#operator_lLoc? (readonly)

Location of the unary - (but not ‘+`)

“‘text -1r ~ “`

Returns:



3401
3402
3403
# File 'lib/lib-ruby-parser/nodes.rb', line 3401

def operator_l
  @operator_l
end

#valueString (readonly)

String value of the literal, ‘String(“1r”)` for 1r

Returns:

  • (String)


3392
3393
3394
# File 'lib/lib-ruby-parser/nodes.rb', line 3392

def value
  @value
end