Module: StraightJacket::Validator

Defined in:
lib/straight_jacket/validator.rb

Class Method Summary collapse

Class Method Details

.int?(value) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
7
8
9
10
# File 'lib/straight_jacket/validator.rb', line 4

def self.int?(value)
  if match = /\d+/.match(value)
    match[0] == value
  else
    false
  end
end