Class: Lotus::Action::Cache::Expires::Directives Private
- Inherits:
-
Object
- Object
- Lotus::Action::Cache::Expires::Directives
- Defined in:
- lib/lotus/action/cache/expires.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Class which stores Expires directives
Instance Method Summary collapse
- #headers ⇒ Object private
-
#initialize(amount, *values) ⇒ Directives
constructor
private
A new instance of Directives.
Constructor Details
#initialize(amount, *values) ⇒ Directives
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Directives.
55 56 57 58 |
# File 'lib/lotus/action/cache/expires.rb', line 55 def initialize(amount, *values) @amount = amount @cache_control = Lotus::Action::Cache::CacheControl::Directives.new(*(values << { max_age: amount })) end |
Instance Method Details
#headers ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
60 61 62 |
# File 'lib/lotus/action/cache/expires.rb', line 60 def headers { HEADER => time.httpdate }.merge(@cache_control.headers) end |