Module: SyncHash::Inheritor

Defined in:
lib/mega/synchash.rb

Overview

This module is used when a delegate is NOT being used.

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ Object



79
80
81
# File 'lib/mega/synchash.rb', line 79

def [](key)
  @sync.synchronize(::Sync::SH) { super }
end

#[]=(key, value) ⇒ Object



83
84
85
# File 'lib/mega/synchash.rb', line 83

def []=(key, value)
  @sync.synchronize(::Sync::EX) { super }
end

#clearObject



91
92
93
# File 'lib/mega/synchash.rb', line 91

def clear
  @sync.synchronize(::Sync::EX) { super }
end

#delete(key) ⇒ Object



87
88
89
# File 'lib/mega/synchash.rb', line 87

def delete(key)
  @sync.synchronize(::Sync::EX) { super }
end

#keysObject



103
104
105
# File 'lib/mega/synchash.rb', line 103

def keys
  @sync.synchronize(::Sync::SH) { super }
end

#sizeObject



95
96
97
# File 'lib/mega/synchash.rb', line 95

def size
  @sync.synchronize(::Sync::SH) { super }
end

#valuesObject



99
100
101
# File 'lib/mega/synchash.rb', line 99

def values
  @sync.synchronize(::Sync::SH) { super }
end