Sha256: 3740ef8b4d157b7ab13e9293f0783fb3b8f4cbda2bcb09dbe4cd93fc7a2f8445
Contents?: true
Size: 477 Bytes
Versions: 15
Compression:
Stored size: 477 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
15 entries across 15 versions & 1 rubygems