Module: RuboCop::AST::BasicLiteralNode

Included in:
FloatNode, IntNode, RationalNode, StrNode, SymbolNode
Defined in:
lib/rubocop/ast/node/mixin/basic_literal_node.rb

Overview

Common functionality for primitive literal nodes: ‘sym`, `str`, `int`, `float`, `rational`…

Instance Method Summary collapse

Instance Method Details

#valuemixed

Returns the value of the literal.

Returns:

  • (mixed)

    the value of the literal



11
12
13
# File 'lib/rubocop/ast/node/mixin/basic_literal_node.rb', line 11

def value
  node_parts[0]
end