Project

duplicate

0.0
No commit activity in last 3 years
No release in over 3 years
Originally extracted from rack-app project. Deep duplication for ruby objects in pure ruby, that allow you recursively duplicate objects based on a source object, even replacing original object references
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
~> 10.0
~> 3.0
 Project Readme

Duplicate Build Status

Duplicate is Originally extracted from rack-app project. Allows you to Deep duplicate any ruby objects in pure ruby way. That way you can recursively duplicate objects and even replacing original object references with in instance variable references

Installation

Add this line to your application's Gemfile:

gem 'duplicate'

And then execute:

$ bundle

Or install it yourself as:

$ gem install duplicate

Usage

Duplicate.duplicate('Hello, world!') #> returns duplication
Duplicate.duplicate(Class.new) #> returns duplication

or with syntax sugar

duplicate(Object.new) #> return duplication

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/duplicate. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.