Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more

In Files

  • drb/timeridconv.rb

DRb::TimerIdConv

Public Class Methods

new(timeout=600) click to toggle source
 
               # File drb/timeridconv.rb, line 74
def initialize(timeout=600)
  @holder = TimerHolder2.new(timeout)
end
            

Public Instance Methods

to_id(obj) click to toggle source
 
               # File drb/timeridconv.rb, line 85
def to_id(obj)
  return @holder.add(obj)
end
            
to_obj(ref) click to toggle source
 
               # File drb/timeridconv.rb, line 78
def to_obj(ref)
  return super if ref.nil?
  @holder.fetch(ref)
rescue TimerHolder2::InvalidIndexError
  raise "invalid reference"
end