Sha256: ccddfa5f90294ec0fe651a99cac6e559c72e0a5a1257b476572e53b3a92af056
Contents?: true
Size: 339 Bytes
Versions: 10
Compression:
Stored size: 339 Bytes
Contents
module CFoundry::V2::Helper def to_many_support(plural) singular = plural.to_s.sub(/s$/, "").to_sym alias_method :"remove_#{singular}_without_support", :"remove_#{singular}" define_method(:"remove_#{singular}") do |x| result = self.__send__("remove_#{singular}_without_support", x) result.nil? end end end
Version data entries
10 entries across 10 versions & 2 rubygems