Method: Hanami::Utils::Kernel.numeric?
- Defined in:
- lib/hanami/utils/kernel.rb
permalink .numeric?(arg) ⇒ TrueClass, FalseClass
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Checks if the given argument is a string representation of a number
1034 1035 1036 |
# File 'lib/hanami/utils/kernel.rb', line 1034 def self.numeric?(arg) !(arg.to_s =~ NUMERIC_MATCHER).nil? end |