Module: Spree::Support::CoreExtensions::String

Defined in:
lib/spree/support/core_extensions/string.rb

Instance Method Summary collapse

Instance Method Details

#is_integer?Boolean

Returns:

  • (Boolean)


6
7
8
9
10
11
12
13
# File 'lib/spree/support/core_extensions/string.rb', line 6

def is_integer?
  begin
    Integer(self.to_s)
    return true
  rescue ArgumentError
    return false
  end
end