Module: Frozen

Defined in:
lib/frozen-objects.rb,
lib/frozen-objects/hash.rb,
lib/frozen-objects/array.rb,
lib/frozen-objects/string.rb

Overview

Implicitly frozen objects.

Defined Under Namespace

Classes: Array, Hash, String

Class Method Summary collapse

Class Method Details

.<<(value) ⇒ Object

Creates frozen object by operator.

Parameters:

  • value (Object)

    some value for freeze

Returns:

  • (Object)

    frozen object

Since:

  • 0.2.0



22
23
24
# File 'lib/frozen-objects.rb', line 22

def self.<<(value)
    value.freeze
end