class UU::RemoteHelper
Attributes
count[R]
Public Class Methods
new()
click to toggle source
# File lib/drb/http0helper.rb, line 21 def initialize @mutex = Mutex.new @count = 0 end
Public Instance Methods
disable()
click to toggle source
# File lib/drb/http0helper.rb, line 28 def disable @mutex.synchronize do @count += 1 GC.disable end end
enable()
click to toggle source
# File lib/drb/http0helper.rb, line 35 def enable @mutex.synchronize do @count -= 1 break unless @count <= 0 GC.enable end end
eval_(code)
click to toggle source
# File lib/drb/http0helper.rb, line 51 def eval_(code) instance_eval(code) end
klass(name)
click to toggle source
# File lib/drb/http0helper.rb, line 55 def klass(name) eval_(name.to_s) end
reset()
click to toggle source
# File lib/drb/http0helper.rb, line 44 def reset @mutex.synchronize do @count = 0 GC.enable end end