class String

Public Instance Methods

integer?() click to toggle source
# File lib/rails_com/core/string.rb, line 3
def integer?
  Integer(self).is_a?(Integer)
rescue ArgumentError, TypeError
  false
end
numeric?() click to toggle source
# File lib/rails_com/core/string.rb, line 9
def numeric?
  Float(self).is_a?(Numeric)
rescue ArgumentError, TypeError
  false
end