Module: Adamantium

Defined in:
lib/adamantium.rb,
lib/adamantium/freezer.rb,
lib/adamantium/mutable.rb,
lib/adamantium/version.rb,
lib/adamantium/class_methods.rb,
lib/adamantium/module_methods.rb

Overview

Allows objects to be made immutable

Defined Under Namespace

Modules: ClassMethods, Flat, ModuleMethods, Mutable Classes: Freezer

Constant Summary collapse

VERSION =

Gem version

'0.2.0'.freeze

Instance Method Summary collapse

Instance Method Details

#dupself

A noop #dup for immutable objects

Examples:

object.dup  # => self

Returns:

  • (self)


73
74
75
# File 'lib/adamantium.rb', line 73

def dup
  self
end