Class: Effective::Stamp
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Effective::Stamp
- Defined in:
- app/models/effective/stamp.rb
Constant Summary collapse
- CATEGORIES =
CATEGORIES = ['Physical', 'Digital-only']
['Physical']
Instance Method Summary collapse
Instance Method Details
#issued? ⇒ Boolean
60 61 62 |
# File 'app/models/effective/stamp.rb', line 60 def issued? issued_at.present? end |
#mark_as_issued! ⇒ Object
56 57 58 |
# File 'app/models/effective/stamp.rb', line 56 def mark_as_issued! update!(issued_at: Time.zone.now) end |
#physical? ⇒ Boolean
64 65 66 |
# File 'app/models/effective/stamp.rb', line 64 def physical? category == 'Physical' end |
#to_s ⇒ Object
52 53 54 |
# File 'app/models/effective/stamp.rb', line 52 def to_s ['Professional Stamp', *name.presence].join(' ') end |