Class: Verifiable::Verification
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Verifiable::Verification
- Defined in:
- lib/verifiable/verification.rb
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Verification
constructor
A new instance of Verification.
- #verified? ⇒ Boolean
Constructor Details
#initialize(attrs = {}) ⇒ Verification
Returns a new instance of Verification.
12 13 14 |
# File 'lib/verifiable/verification.rb', line 12 def initialize(attrs = {}) super({:code => sprintf("%04d", rand(10000))}.merge(attrs || {})) end |
Instance Method Details
#verified? ⇒ Boolean
16 17 18 |
# File 'lib/verifiable/verification.rb', line 16 def verified? !verified_at.nil? end |