Module: RuboCop::AST::NumericNode
- Included in:
- ComplexNode, FloatNode, IntNode, RationalNode
- Defined in:
- lib/rubocop/ast/node/mixin/numeric_node.rb
Overview
Common functionality for primitive numeric nodes: ‘int`, `float`, `rational`, `complex`…
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.
17 18 19 |
# File 'lib/rubocop/ast/node/mixin/numeric_node.rb', line 17 def sign? source.match?(SIGN_REGEX) end |