Class: Switchman::Parallel::ResultWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/switchman/parallel.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(result) ⇒ ResultWrapper

Returns a new instance of ResultWrapper.



43
44
45
46
47
48
49
50
# File 'lib/switchman/parallel.rb', line 43

def initialize(result)
  @result =
    begin
      Marshal.dump(result) && result
    rescue
      UndumpableResult.new(result)
    end
end

Instance Attribute Details

#resultObject (readonly)

Returns the value of attribute result.



41
42
43
# File 'lib/switchman/parallel.rb', line 41

def result
  @result
end