Exception: TokenAttr::TooManyAttemptsError
- Inherits:
-
StandardError
- Object
- StandardError
- TokenAttr::TooManyAttemptsError
- Defined in:
- lib/token_attr/errors.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(attr_name, token, message = nil) ⇒ TooManyAttemptsError
constructor
A new instance of TooManyAttemptsError.
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, = nil) @attribute = attr_name @token = token ||= "Can't generate unique token for \"#{attr_name}\". Last attempt with \"#{token}\"." super() end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
4 5 6 |
# File 'lib/token_attr/errors.rb', line 4 def attribute @attribute end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
4 5 6 |
# File 'lib/token_attr/errors.rb', line 4 def token @token end |