Exception: TokenAttr::TooManyAttemptsError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attr_name, token, message = nil) ⇒ TooManyAttemptsError



6
7
8
9
10
11
# File 'lib/token_attr/errors.rb', line 6

def initialize(attr_name, token, message = nil)
  @attribute = attr_name
  @token = token
  message ||= "Can't generate unique token for \"#{attr_name}\". Last attempt with \"#{token}\"."
  super(message)
end

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



4
5
6
# File 'lib/token_attr/errors.rb', line 4

def attribute
  @attribute
end

#tokenObject (readonly)

Returns the value of attribute token.



4
5
6
# File 'lib/token_attr/errors.rb', line 4

def token
  @token
end