Sha256: 131e1938a6a3d53d8651ac95d2247ea82ed7936a398aaf22f6d283abd86bfa1a

Contents?: true

Size: 204 Bytes

Versions: 1

Compression:

Stored size: 204 Bytes

Contents

class String # :nodoc:
  # Check string is numeric or not
  #
  # @example
  #   'abc'.numeric? #=> false
  #   '123'.numeric? #=> true
  def numeric?
    true if Float(self)
  rescue
    false
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
einvoice-qr-encryptor-0.2.0 lib/einvoice-qr-encryptor/core_ext/string.rb