Sha256: 5e1f02d7eae7a2e6045b07209d02f178cb4e7ec9991fa74930f5e5c53ffabc7c
Contents?: true
Size: 316 Bytes
Versions: 22
Compression:
Stored size: 316 Bytes
Contents
# -*- encoding: utf-8 -*- module PMP module Utils def to_ruby_safe_name(name) safe = name.to_s.strip safe = safe.gsub(/[^\w_!?=]+/, '_').sub(/^[0-9!?=]/, '') safe[0..-2].gsub(/[!?=]+/, '_') + safe[-1] end def to_json_key_name(name) name.to_s.gsub(/_/, '-') end end end
Version data entries
22 entries across 22 versions & 1 rubygems