Class: TokenBox::Token
- Inherits:
-
Object
- Object
- TokenBox::Token
- Defined in:
- lib/pasaporte/token_box.rb
Instance Attribute Summary collapse
-
#token ⇒ Object
(also: #to_s)
readonly
Returns the value of attribute token.
Instance Method Summary collapse
- #expired? ⇒ Boolean
-
#initialize(lifetime) ⇒ Token
constructor
A new instance of Token.
- #inspect ⇒ Object
Constructor Details
Instance Attribute Details
#token ⇒ Object (readonly) Also known as: to_s
Returns the value of attribute token.
9 10 11 |
# File 'lib/pasaporte/token_box.rb', line 9 def token @token end |
Instance Method Details
#expired? ⇒ Boolean
17 18 19 |
# File 'lib/pasaporte/token_box.rb', line 17 def expired? @will_expire < Time.now.utc end |
#inspect ⇒ Object
21 22 23 |
# File 'lib/pasaporte/token_box.rb', line 21 def inspect "#{@token}:#{'exp' if expired?}" end |