Sha256: 844809c93a17c5dc8f4bc187e35dc36785771378027825e85031f09b2eab8ae7
Contents?: true
Size: 639 Bytes
Versions: 6
Compression:
Stored size: 639 Bytes
Contents
# # This file is for Rails-1.1.6. # From activesupport-1.4.1/lib/active_support/core_ext/module/aliasing.rb # class Module unless defined? alias_method_chain def alias_method_chain(target, feature) # Strip out punctuation on predicates or bang methods since # e.g. target?_without_feature is not a valid method name. aliased_target, punctuation = target.to_s.sub(/([?!=])$/, ''), $1 yield(aliased_target, punctuation) if block_given? alias_method "#{aliased_target}_without_#{feature}#{punctuation}", target alias_method target, "#{aliased_target}_with_#{feature}#{punctuation}" end end end
Version data entries
6 entries across 6 versions & 1 rubygems