Module: Hamster::ReadCopyUpdate

Extended by:
Forwardable
Included in:
MutableHash, MutableQueue, MutableSet
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

#method_missing(name, *args, &block) ⇒ Object (private)


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

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

Instance Method Details

#eql?(other) ⇒ Boolean Also known as: ==

Returns:

  • (Boolean)

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

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

#initialize(content) ⇒ Object


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

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