Class: DRb::DRbArray

Inherits:
Object
  • Object
show all
Defined in:
lib/opal/drb/drb.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ary) ⇒ DRbArray

Returns a new instance of DRbArray.



75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/opal/drb/drb.rb', line 75

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

Class Method Details

._load(s) ⇒ Object



90
91
92
# File 'lib/opal/drb/drb.rb', line 90

def self._load(s)
  Marshal::load(s)
end

Instance Method Details

#_dump(lv) ⇒ Object



94
95
96
# File 'lib/opal/drb/drb.rb', line 94

def _dump(lv)
  Marshal.dump(@ary)
end