Sha256: b226ef8837c300a60530e049c7412c2be81467a1dda47eb331fec445cac2b603
Contents?: true
Size: 359 Bytes
Versions: 2
Compression:
Stored size: 359 Bytes
Contents
# encoding: UTF-8 # Primary Factor.io module module Factor String.send :define_method, :classify do self.split('_').collect! { |w| w.capitalize }.join end String.send :define_method, :underscore do self.gsub(/::/, '/') .gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2') .gsub(/([a-z\d])([A-Z])/, '\1_\2') .tr('-', '_') .downcase end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
factor-0.5.05 | lib/factor/base.rb |
factor-0.5.04 | lib/factor/base.rb |