Sha256: 3a4093c563baa039effe083f5a647cd3a0315e1b5db1f4e63e127ed3fbefc810
Contents?: true
Size: 436 Bytes
Versions: 5
Compression:
Stored size: 436 Bytes
Contents
module ActiveSupport::Inflector def deinstance_variableize(the_string) result = the_string.to_s.dup result.downcase.gsub(/^@/, '') end def instance_variableize(the_string) "@#{the_string}".to_sym end end class String def deinstance_variableize ActiveSupport::Inflector.deinstance_variableize(self) end def instance_variableize ActiveSupport::Inflector.instance_variableize(self) end end
Version data entries
5 entries across 5 versions & 1 rubygems