Sha256: 223eb626349356b8d699dada9f99b36f05733708b22542f81bd7996761c3d1cb
Contents?: true
Size: 280 Bytes
Versions: 19
Compression:
Stored size: 280 Bytes
Contents
module Generator module Underscore refine String do def underscore downcase.gsub(/[- ]/, '_').gsub(/[^\w?]/, '') end end refine Fixnum do def underscore self.to_s.reverse.gsub(/...(?=.)/, '\&_').reverse end end end end
Version data entries
19 entries across 19 versions & 1 rubygems