Exception: Propr::Falsifiable

Inherits:
StandardError
  • Object
show all
Defined in:
lib/propr.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(counterex, shrunken, passed, skipped) ⇒ Falsifiable

Returns a new instance of Falsifiable.



27
28
29
30
# File 'lib/propr.rb', line 27

def initialize(counterex, shrunken, passed, skipped)
  @counterex, @shrunken, @passed, @skipped =
    counterex, shrunken, passed, skipped
end

Instance Attribute Details

#counterexObject (readonly)

Returns the value of attribute counterex.



25
26
27
# File 'lib/propr.rb', line 25

def counterex
  @counterex
end

#passedObject (readonly)

Returns the value of attribute passed.



25
26
27
# File 'lib/propr.rb', line 25

def passed
  @passed
end

#shrunkenObject (readonly)

Returns the value of attribute shrunken.



25
26
27
# File 'lib/propr.rb', line 25

def shrunken
  @shrunken
end

#skippedObject (readonly)

Returns the value of attribute skipped.



25
26
27
# File 'lib/propr.rb', line 25

def skipped
  @skipped
end

Instance Method Details

#to_sObject



40
41
42
43
44
45
46
47
48
49
# File 'lib/propr.rb', line 40

def to_s
  if @shrunken.nil?
    ["input: #{counterex.map(&:inspect).join(", ")}",
     "after: #{@passed} passed, #{@skipped} skipped"].join("\n")
  else
    ["input:    #{counterex.map(&:inspect).join(", ")}",
     "shrunken: #{shrunken.map(&:inspect).join(", ")}",
     "after: #{@passed} passed, #{@skipped} skipped"].join("\n")
  end
end