Method: Puppet::Indirector::Terminus.const2name

Defined in:
lib/vendor/puppet/indirector/terminus.rb

.const2name(const) ⇒ Object

Convert a constant to a short name.



23
24
25
# File 'lib/vendor/puppet/indirector/terminus.rb', line 23

def const2name(const)
  const.sub(/^[A-Z]/) { |i| i.downcase }.gsub(/[A-Z]/) { |i| "_#{i.downcase}" }.intern
end