Sha256: 723eb5a1f234ebfd6a314e3787f95e22bf6f6f1dd435bbb92cc054eb62b8d99b

Contents?: true

Size: 171 Bytes

Versions: 6

Compression:

Stored size: 171 Bytes

Contents

class Exception

  # Does a block raise an a given +exception+.
  #
  def raised? #:yeild:
    begin
      yield
      false
    rescue self
      true
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
facets-2.8.4 lib/core/facets/exception/raised.rb
facets-2.8.3 lib/core/facets/exception/raised.rb
facets-2.8.2 lib/core/facets/exception/raised.rb
facets-2.8.1 lib/core/facets/exception/raised.rb
facets-2.8.0 lib/core/facets/exception/raised.rb
facets-2.7.0 lib/core/facets/exception/raised.rb