Categories: None [Edit]

mutability

https://rubygems.org/gems/mutability
https://github.com/ksearfos/mutability
Mutability is a module that provides the very simple ability to designate an "original" version of an object that is frozen, and will not change even if the working copy of the object does. The best example is a Hash or Array -- collections like those exist partly so they can be mutated in some way, either by adding or removing elements or changing their order. Now, rather than having to establish a separate "original" version of the object (not to mention dealing with the whole ivars-act-like-pointers-and-can-get-magically-changed-oops problem), you can use a MutableHash or MutableArray, and then change it to your heart's content. The MutableHash/Array are built from the Mutability mix-in, so downloading this gem also provides a library for you to add the same capabilities to any other Class you might want. Also included is the ability to revert to the original form with a single method call.

Total

Ranking: 80,493 of 183,477
Downloads: 10,335

Daily

Ranking: 63,432 of 183,470
Downloads: 0

Depended by

RankDownloadsName

Depends on

RankDownloadsName
62484,887,430rubocop
2,8934,387,650gem-release

Owners

#GravatarHandle
1iconSwordOfDamocles