Exception: Rant::TooManyTries

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/rant/generator.rb

Instance Method Summary collapse

Constructor Details

#initialize(limit, nfailed) ⇒ TooManyTries

Returns a new instance of TooManyTries.



24
25
26
27
# File 'lib/rant/generator.rb', line 24

def initialize(limit,nfailed)
  @limit = limit
  @nfailed = nfailed
end

Instance Method Details

#to_sObject



33
34
35
# File 'lib/rant/generator.rb', line 33

def to_s
  "Exceed gen limit #{@limit}: #{@nfailed} failed guards)"
end

#triesObject



29
30
31
# File 'lib/rant/generator.rb', line 29

def tries
  @nfailed
end