Method: DRb::DRbArray#initialize
- Defined in:
- lib/drb/drb.rb
#initialize(ary) ⇒ DRbArray
Creates a new DRbArray that either dumps or wraps all the items in the Array ary
so they can be loaded by a remote DRb server.
523 524 525 526 527 528 529 530 531 532 533 534 535 536 |
# File 'lib/drb/drb.rb', line 523 def initialize(ary) @ary = ary.collect { |obj| if obj.kind_of? DRbUndumped DRbObject.new(obj) else begin Marshal.dump(obj) obj rescue DRbObject.new(obj) end end } end |