Class: EmailTokenValidation::EmailToken
- Inherits:
-
Object
- Object
- EmailTokenValidation::EmailToken
- Defined in:
- app/controllers/concerns/email_token_validation.rb
Instance Attribute Summary collapse
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(email, token) ⇒ EmailToken
constructor
A new instance of EmailToken.
- #valid? ⇒ Boolean
Constructor Details
#initialize(email, token) ⇒ EmailToken
Returns a new instance of EmailToken.
18 19 20 |
# File 'app/controllers/concerns/email_token_validation.rb', line 18 def initialize(email, token) @email, @token = email, token end |
Instance Attribute Details
#token ⇒ Object (readonly)
Returns the value of attribute token.
16 17 18 |
# File 'app/controllers/concerns/email_token_validation.rb', line 16 def token @token end |
Instance Method Details
#valid? ⇒ Boolean
22 23 24 |
# File 'app/controllers/concerns/email_token_validation.rb', line 22 def valid? present? && user && token && !expired? && secure_compare end |