Module: CouchPillow::TTLDirective
- Included in:
- Document
- Defined in:
- lib/couchpillow/directives/ttl.rb
Instance Method Summary collapse
- #has_ttl? ⇒ Boolean
-
#ttl(value) ⇒ Object
Sets the TTL.
- #ttl_value ⇒ Object
Instance Method Details
#has_ttl? ⇒ Boolean
16 17 18 |
# File 'lib/couchpillow/directives/ttl.rb', line 16 def has_ttl? @ttl ? true : false end |
#ttl(value) ⇒ Object
Sets the TTL
7 8 9 |
# File 'lib/couchpillow/directives/ttl.rb', line 7 def ttl value @ttl = value end |
#ttl_value ⇒ Object
12 13 14 |
# File 'lib/couchpillow/directives/ttl.rb', line 12 def ttl_value has_ttl? ? @ttl.to_i : nil end |