Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/greenhat/color.rb,
lib/greenhat/thing/helpers.rb
Overview
Pretty sure this is a bad idea to patch string. mentalized.net/journal/2011/04/14/ruby-how-to-check-if-a-string-is-numeric/
Instance Method Summary collapse
Instance Method Details
#numeric? ⇒ Boolean
45 46 47 48 49 |
# File 'lib/greenhat/thing/helpers.rb', line 45 def numeric? !Float(self).nil? rescue StandardError false end |