Module: RuboCop::AST::NumericNode
Overview
Common functionality for primitive numeric nodes: ‘int`, `float`, …
Constant Summary collapse
- SIGN_REGEX =
/\A[+-]/.freeze
Instance Method Summary collapse
-
#sign? ⇒ Boolean
Checks whether this is literal has a sign.
Instance Method Details
#sign? ⇒ Boolean
Checks whether this is literal has a sign.
16 17 18 |
# File 'lib/rubocop/ast/node/mixin/numeric_node.rb', line 16 def sign? source.match(SIGN_REGEX) end |