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.



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

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.



39
40
41
# File 'lib/switchman/parallel.rb', line 39

def result
  @result
end