Class: Ask::State::Lock
- Inherits:
-
Data
- Object
- Data
- Ask::State::Lock
- Defined in:
- lib/ask/state.rb
Instance Attribute Summary collapse
-
#expires_at ⇒ Object
readonly
Returns the value of attribute expires_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
Instance Attribute Details
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at
37 38 39 |
# File 'lib/ask/state.rb', line 37 def expires_at @expires_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id
37 38 39 |
# File 'lib/ask/state.rb', line 37 def id @id end |
#token ⇒ Object (readonly)
Returns the value of attribute token
37 38 39 |
# File 'lib/ask/state.rb', line 37 def token @token end |
Instance Method Details
#expired?(now = Time.now) ⇒ Boolean
38 39 40 |
# File 'lib/ask/state.rb', line 38 def expired?(now = Time.now) expires_at && now >= expires_at end |