lib/lite/address/ukey.rb in lite-address-1.0.1 vs lib/lite/address/ukey.rb in lite-address-1.1.0
- old
+ new
@@ -1,19 +1,17 @@
# frozen_string_literal: true
-require 'digest' unless defined?(Digest)
+require "digest" unless defined?(Digest)
module Lite
module Address
- class Ukey
+ module Ukey
- class << self
+ module_function
- def generate(value)
- result = value.downcase.gsub(/[^0-9a-z]/i, '')
- Digest::MD5.hexdigest(result)
- end
-
+ def generate(value)
+ result = value.downcase.gsub(/[^0-9a-z]/i, "")
+ Digest::MD5.hexdigest(result)
end
end
end
end