Class: String
Overview
utils.rb #### This file contains some additions to base classes and some other small utility snippets
Instance Method Summary collapse
Instance Method Details
#numeric? ⇒ Boolean
26 27 28 29 30 31 32 |
# File 'lib/ratchet/utils.rb', line 26 def numeric? return false if self.scan('.').length > 1 #more then one floating points - bad if to_i == 0 and self != '0' return false end true end |