Exception: Rantly::TooManyTries

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

Instance Method Summary collapse

Constructor Details

#initialize(limit, nfailed) ⇒ TooManyTries


35
36
37
38
# File 'lib/rantly/generator.rb', line 35

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

Instance Method Details

#to_sObject


44
45
46
# File 'lib/rantly/generator.rb', line 44

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

#triesObject


40
41
42
# File 'lib/rantly/generator.rb', line 40

def tries
  @nfailed
end