File: exception.rb

package info (click to toggle)
ruby-ae 1.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 208 kB
  • ctags: 172
  • sloc: ruby: 936; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 363 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class Exception
  # Is this exception the result of an assertion?
  def assertion?
    @assertion || false
  end

  # Set +true+/+false+ if the this exception is 
  # an assertion.
  def set_assertion(boolean)
    @assertion = !!boolean
  end

  #
  def negative?
    @negative || false
  end

  #
  def set_negative(boolean)
    @negative = !!boolean
  end
end