Sha256: a41814c69fdedc64d6e8475e26cdf6bd271ab4623123b03e2560fd84482f3227

Contents?: true

Size: 196 Bytes

Versions: 24

Compression:

Stored size: 196 Bytes

Contents

module Eucalypt
  module Helpers
    module Numeric
      def self.string?(string)
        return true if string =~ /\A\d+\Z/
        true if Float(string) rescue false
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
eucalypt-0.1.3 lib/eucalypt/helpers/numeric.rb
eucalypt-0.1.2 lib/eucalypt/helpers/numeric.rb
eucalypt-0.1.1 lib/eucalypt/helpers/numeric.rb
eucalypt-0.1.0 lib/eucalypt/helpers/numeric.rb