Sha256: d02be692ddef470daaf4e654697c830df9a61e4c7a82924811861026888e0407

Contents?: true

Size: 415 Bytes

Versions: 33

Compression:

Stored size: 415 Bytes

Contents

module Rake
  ##
  # Mixin for creating easily cloned objects.

  module Cloneable # :nodoc:
    # The hook that invoked by 'clone' and 'dup' methods.
    def initialize_copy(source)
      super
      source.instance_variables.each do |var|
        src_value  = source.instance_variable_get(var)
        value = src_value.clone rescue src_value
        instance_variable_set(var, value)
      end
    end
  end
end

Version data entries

33 entries across 26 versions & 7 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/rake-10.3.2/lib/rake/cloneable.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/cloneable.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/rake-10.3.2/lib/rake/cloneable.rb
allegro_api_client-0.0.9 gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/cloneable.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.8/gems/rake-10.3.2/lib/rake/cloneable.rb
apl-library-0.0.90 vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/cloneable.rb
apl-library-0.0.90 vendor/bundle/ruby/1.8/gems/rake-10.3.2/lib/rake/cloneable.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/cloneable.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/cloneable.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.9.1/gems/rake-10.3.2/lib/rake/cloneable.rb
allegro_api_client-0.0.8 gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/cloneable.rb
allegro_api_client-0.0.7 gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/cloneable.rb
allegro_api_client-0.0.6 gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/cloneable.rb
allegro_api_client-0.0.5 gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/cloneable.rb
allegro_api_client-0.0.4 gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/cloneable.rb
allegro_api_client-0.0.3 gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/cloneable.rb
allegro_api_client-0.0.2 gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/cloneable.rb
allegro_api_client-0.0.1 gems/ruby/2.1.0/gems/rake-10.3.2/lib/rake/cloneable.rb
nanumfont-rails-0.1 vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/cloneable.rb
spline-0.0.11 vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/cloneable.rb