class Protocol::HTTP::Header::CacheControl
Constants
- DYNAMIC
- MAX_AGE
- NO_CACHE
- NO_STORE
- PRIVATE
- PUBLIC
- STATIC
- STREAMING
Public Class Methods
new(value)
click to toggle source
Calls superclass method
# File lib/protocol/http/header/cache_control.rb, line 39 def initialize(value) super(value.downcase) end
Public Instance Methods
<<(value)
click to toggle source
Calls superclass method
# File lib/protocol/http/header/cache_control.rb, line 43 def << value super(value.downcase) end
dynamic?()
click to toggle source
# File lib/protocol/http/header/cache_control.rb, line 51 def dynamic? self.include?(DYNAMIC) end
max_age()
click to toggle source
# File lib/protocol/http/header/cache_control.rb, line 75 def max_age if value = self.find{|value| value.start_with?(MAX_AGE)} _, age = value.split('=', 2) return Integer(age) end end
no_cache?()
click to toggle source
# File lib/protocol/http/header/cache_control.rb, line 67 def no_cache? self.include?(NO_CACHE) end
no_store?()
click to toggle source
# File lib/protocol/http/header/cache_control.rb, line 71 def no_store? self.include?(NO_STORE) end
private?()
click to toggle source
# File lib/protocol/http/header/cache_control.rb, line 59 def private? self.include?(PRIVATE) end
public?()
click to toggle source
# File lib/protocol/http/header/cache_control.rb, line 63 def public? self.include?(PUBLIC) end
static?()
click to toggle source
# File lib/protocol/http/header/cache_control.rb, line 47 def static? self.include?(STATIC) end
streaming?()
click to toggle source
# File lib/protocol/http/header/cache_control.rb, line 55 def streaming? self.include?(STREAMING) end