Sha256: 0576d109f67934ea29aad65a96caf28f1511ec753d222c42576b5a1281c44a20
Contents?: true
Size: 436 Bytes
Versions: 65
Compression:
Stored size: 436 Bytes
Contents
# frozen_string_literal: true module RuboCop module AST # Common functionality for primitive numeric nodes: `int`, `float`, ... module NumericNode SIGN_REGEX = /\A[+-]/.freeze # 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
65 entries across 45 versions & 6 rubygems