Module: TabsTabs::Resolutionable
- Included in:
- Resolution, TabsTabs::Resolutions::Day, TabsTabs::Resolutions::Hour, TabsTabs::Resolutions::Minute, TabsTabs::Resolutions::Month, TabsTabs::Resolutions::Week, TabsTabs::Resolutions::Year
- Defined in:
- lib/tabs_tabs/resolutionable.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 |
# File 'lib/tabs_tabs/resolutionable.rb', line 4 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#expire(key, timestamp) ⇒ Object
40 41 42 43 44 45 |
# File 'lib/tabs_tabs/resolutionable.rb', line 40 def expire(key, ) return unless TabsTabs::Config.expires?(name) resolution_ends_at = .utc.to_i + to_seconds expires_at = resolution_ends_at + TabsTabs::Config.expires_in(name) Storage.expireat(key, expires_at) end |