Sha256: 2084ce1158b35be4d0a2d3540601bacaf64645a1ea959dc3eb1dfb4c33ceb66b
Contents?: true
Size: 481 Bytes
Versions: 20
Compression:
Stored size: 481 Bytes
Contents
# frozen_string_literal: true module RuboCop module AST # Common functionality for primitive numeric nodes: `int`, `float`, `rational`... module NumericNode SIGN_REGEX = /\A[+-]/.freeze private_constant :SIGN_REGEX # Checks whether this is literal has a sign. # # @example # # +42 # # @return [Boolean] whether this literal has a sign. def sign? source.match(SIGN_REGEX) end end end end
Version data entries
20 entries across 20 versions & 3 rubygems