Sha256: ee3fbf739265b15f89d7d7252b04afb767035d7b4e6b057a516a01462bb00ed9
Contents?: true
Size: 299 Bytes
Versions: 16
Compression:
Stored size: 299 Bytes
Contents
require 'active_support/core_ext/string' class StringHelper def self.to_class(word) singularize(word.to_s).camelize.constantize end # super simple singularizer def self.singularize(word) word.gsub /(.*)s/,'\1' end def self.constantize(word) word.constantize end end
Version data entries
16 entries across 16 versions & 1 rubygems