Module: CouchPillow::TTLDirective

Included in:
Document
Defined in:
lib/couchpillow/directives/ttl.rb

Instance Method Summary collapse

Instance Method Details

#has_ttl?Boolean

Returns:



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_valueObject



12
13
14
# File 'lib/couchpillow/directives/ttl.rb', line 12

def ttl_value
  has_ttl? ? @ttl.to_i : nil
end