Class: Hanami::Action::Cache::CacheControl::Directives Private
- Inherits:
- 
      Object
      
        - Object
- Hanami::Action::Cache::CacheControl::Directives
 
- Defined in:
- lib/hanami/action/cache/cache_control.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 CacheControl values
Instance Method Summary collapse
- #headers ⇒ Object private
- 
  
    
      #initialize(*values)  ⇒ Directives 
    
    
  
  
  
    constructor
  
  
  
  
  
  private
  
    A new instance of Directives. 
Constructor Details
#initialize(*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.
| 66 67 68 | # File 'lib/hanami/action/cache/cache_control.rb', line 66 def initialize(*values) @directives = Hanami::Action::Cache::Directives.new(*values) 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.
| 72 73 74 75 76 77 78 | # File 'lib/hanami/action/cache/cache_control.rb', line 72 def headers if @directives.any? {Action::CACHE_CONTROL => @directives.join(SEPARATOR)} else {} end end |