Sha256: 8d6297083e7b0d9e84431e1d13a3cfa7689dbbb93849fe91de159196243f8769

Contents?: true

Size: 1.46 KB

Versions: 10

Compression:

Stored size: 1.46 KB

Contents

ice_nine
========

Deep freeze ruby objects

[![Gem Version](https://badge.fury.io/rb/ice_nine.svg)][gem]
[![Build Status](https://secure.travis-ci.org/dkubb/ice_nine.svg?branch=master)][travis]
[![Dependency Status](https://gemnasium.com/dkubb/ice_nine.svg)][gemnasium]
[![Code Climate](https://codeclimate.com/github/dkubb/ice_nine.png)][codeclimate]
[![Inline docs](http://inch-ci.org/github/dkubb/ice_nine.svg?branch=master)][inch]

[gem]: https://rubygems.org/gems/ice_nine
[travis]: https://travis-ci.org/dkubb/ice_nine
[gemnasium]: https://gemnasium.com/dkubb/ice_nine
[codeclimate]: https://codeclimate.com/github/dkubb/ice_nine
[inch]: http://inch-ci.org/github/dkubb/ice_nine

Examples
--------

```ruby
require 'ice_nine'

# Deep freezes most kinds of objects
hash   = IceNine.deep_freeze('a' => '1')
array  = IceNine.deep_freeze([ 'a', 'b', 'c' ])
range  = IceNine.deep_freeze('a'..'z')
struct = IceNine.deep_freeze(Struct.new(:a, :b).new('a', 'b'))
object = IceNine.deep_freeze(Object.new)
user   = IceNine.deep_freeze(User.new(name: 'dkubb'))

# Faster deep freeze that skips deep-freezing frozen objects
object = IceNine.deep_freeze!(Object.new)

# Add core extension for Object#deep_freeze (not required by default)
require 'ice_nine'
require 'ice_nine/core_ext/object'

object = Object.new
object.deep_freeze
```

Contributing
------------

See [CONTRIBUTING.md](CONTRIBUTING.md) for details.

Copyright
---------

Copyright © 2012-2014 Dan Kubb. See LICENSE for details.

Version data entries

10 entries across 8 versions & 4 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/ice_nine-0.11.2/README.md
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/ice_nine-0.11.2/README.md
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/ice_nine-0.11.2/README.md
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/ice_nine-0.11.2/README.md
grape-extra_validators-1.0.0 vendor/bundle/ruby/2.4.0/gems/ice_nine-0.11.2/README.md
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/ice_nine-0.11.2/README.md
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/ice_nine-0.11.2/README.md
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/ice_nine-0.11.2/README.md
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/ice_nine-0.11.2/README.md
ice_nine-0.11.2 README.md