Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/facebook_video.rb
Overview
Small extension to determine if string is a number
Instance Method Summary collapse
Instance Method Details
#is_number? ⇒ Boolean
9 10 11 |
# File 'lib/facebook_video.rb', line 9 def is_number? self.match(/\A[+-]?\d+?(\.\d+)?\Z/) == nil ? false : true end |