module Kilza

Tranforms a JSON string into Objects

Tranforms a JSON string into Objects

Constants

VERSION

Public Class Methods

clean(str) click to toggle source

Removes everything except numbers and letters.

@param str [String] string to be cleaned

@return [String] cleaned string

# File lib/kilza.rb, line 29
def self.clean(str)
  str = '_' + str if str[0].number?
  str.gsub(/[^a-zA-Z0-9]/, '_')
end
normalize(str) click to toggle source

Cleans the string and make it lowercase.

@param str [String] string to be cleaned

@return [String] cleaned string

# File lib/kilza.rb, line 39
def self.normalize(str)
  Kilza.clean(str).downcase
end