Module: Hamster::Immutable

Included in:
Hash, Queue, Set, Sorter, Stack, Tuple, Vector
Defined in:
lib/hamster/immutable.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods, MemoizeMethods

Class Method Summary (collapse)

Class Method Details

+ (Object) included(klass)



3
4
5
6
7
8
# File 'lib/hamster/immutable.rb', line 3

def self.included(klass)
  klass.extend(ClassMethods)
  klass.instance_eval do
    include InstanceMethods
  end
end