Method: BitClust::NameUtils.encodeid
- Defined in:
- lib/bitclust/nameutils.rb
.encodeid(str) ⇒ Object
case-sensitive ID -> encoded string (encode only [A-Z])
229 230 231 |
# File 'lib/bitclust/nameutils.rb', line 229 def encodeid(str) str.gsub(/[A-Z]/n) {|ch| "-#{ch}" }.downcase end |