Sha256: 5e53b4b538b7f42fe0f6265b3077842716d3db7710d9d23ef4fe16d41654eb2e
Contents?: true
Size: 475 Bytes
Versions: 33
Compression:
Stored size: 475 Bytes
Contents
# encoding: UTF-8 module Kafo module StringHelper def dashize(string) string.tr('_', '-') end alias :d :dashize def underscore(string) string.tr('-', '_') end alias :u :underscore def with_prefix(param) prefix = KafoConfigure.config.app[:no_prefix] ? '' : "#{d(param.module_name)}-" "#{prefix}#{d(param.name)}" end def parametrize(param, prefix='') "--#{prefix}#{with_prefix(param)}" end end end
Version data entries
33 entries across 33 versions & 1 rubygems