In Files

Parent

Class/Module Index [+]

Quicksearch

Recoverable

wraps an object. if it throws an exception, keeps a copy.

Attributes

error[RW]

Public Class Methods

new(o) click to toggle source
# File lib/sup/util.rb, line 575
def initialize o
  @o = o
  @error = nil
  @mutex = Mutex.new
end

Public Instance Methods

__pass(m, *a, &b) click to toggle source
# File lib/sup/util.rb, line 597
def __pass m, *a, &b
  begin
    @o.send(m, *a, &b)
  rescue Exception => e
    @error ||= e
    raise
  end
end
clear_error!() click to toggle source
# File lib/sup/util.rb, line 583
def clear_error!; @error = nil; end
has_errors?() click to toggle source
# File lib/sup/util.rb, line 584
def has_errors?; !@error.nil?; end
id() click to toggle source
# File lib/sup/util.rb, line 588
def id; __pass :id; end
is_a?(c;) click to toggle source
# File lib/sup/util.rb, line 591
def is_a? c; @o.is_a? c; end
method_missing(m, *a, &b;) click to toggle source
# File lib/sup/util.rb, line 586
def method_missing m, *a, &b; __pass m, *a, &b end
respond_to?(m, include_private=false) click to toggle source
# File lib/sup/util.rb, line 593
def respond_to?(m, include_private=false)
  @o.respond_to?(m, include_private)
end
to_s() click to toggle source
# File lib/sup/util.rb, line 589
def to_s; __pass :to_s; end
to_yaml(x;) click to toggle source
# File lib/sup/util.rb, line 590
def to_yaml x; __pass :to_yaml, x; end

[Validate]

Generated with the Darkfish Rdoc Generator 2.