Sha256: 5922cae1c330b853d982899e3923bdf2277ea68b2e030765961f2ec157574434
Contents?: true
Size: 260 Bytes
Versions: 4
Compression:
Stored size: 260 Bytes
Contents
module ActionTexter class Helper def self.underscore(camel_cased_word) camel_cased_word.to_s.gsub(/::/, '/') .gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2') .gsub(/([a-z\d])([A-Z])/, '\1_\2') .tr('-', '_').downcase end end end
Version data entries
4 entries across 4 versions & 1 rubygems