Sha256: 2629ee9b1265362f17ab6c445db0e68d9bfc9e831444df7b49dcd79637a375a6

Contents?: true

Size: 247 Bytes

Versions: 5

Compression:

Stored size: 247 Bytes

Contents

module Jsonerino
  module Helpers
    def self.numeric?(chr)
      !chr.match(/^[0-9]$/).nil?
    end

    def self.hex?(chr)
      !chr.match(/^\h+$/).nil?
    end

    def self.alphanumeric?(chr)
      !chr.match(/^\w+$/).nil?
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
jsonerino-0.2.4 lib/jsonerino/helpers.rb
jsonerino-0.2.3 lib/jsonerino/helpers.rb
jsonerino-0.2.2 lib/jsonerino/helpers.rb
jsonerino-0.2.1 lib/jsonerino/helpers.rb
jsonerino-0.1.1 lib/jsonerino/helpers.rb