module RuboCop::AST::NumericNode
Common functionality for primitive numeric nodes: `int`, `float`, …
Constants
- SIGN_REGEX
Public Instance Methods
sign?()
click to toggle source
Checks whether this is literal has a sign.
@example
+42
@return [Boolean] whether this literal has a sign.
# File lib/rubocop/ast/node/mixin/numeric_node.rb, line 16 def sign? source.match(SIGN_REGEX) end