Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

allow clone_method declarations to end with a !

  • Loading branch information...
commit f2aea26495522bd8e5f833734c855aae3f93561c 1 parent 8647578
@ninjudd authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/deep_clonable.rb
View
1  lib/deep_clonable.rb
@@ -42,6 +42,7 @@ module ClassMethods
# that part is important) and specify the cloning versions by name
# using this method.
def clone_method(clone_method_name, method_name = nil)
+ clone_method_name = clone_method_name.to_s.gsub(/\!$/,'')
method_name ||= "#{clone_method_name}!"
class_eval %{
def #{clone_method_name}(*args)
Please sign in to comment.
Something went wrong with that request. Please try again.