Module: Hamster::ReadCopyUpdate

Extended by:
Forwardable
Included in:
MutableHash, MutableQueue, MutableSet, MutableStack
Defined in:
lib/hamster/read_copy_update.rb

Instance Method Summary (collapse)

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

- (Object) method_missing(name, *args, &block) (private)



32
33
34
# File 'lib/hamster/read_copy_update.rb', line 32

def method_missing(name, *args, &block)
  @content.send(name, *args, &block) rescue super
end

Instance Method Details

- (Boolean) eql?(other)

Returns:

  • (Boolean)


13
14
15
# File 'lib/hamster/read_copy_update.rb', line 13

def eql?(other)
  instance_of?(other.class) && @content.eql?(other.instance_variable_get(:@content))
end

- (Object) initialize(content)



8
9
10
11
# File 'lib/hamster/read_copy_update.rb', line 8

def initialize(content)
  @content = content
  @lock = Mutex.new
end