Module: Hanami::Action::Cache::CacheControl::ClassMethods Private

Defined in:
lib/hanami/action/cache/cache_control.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Since:

  • 0.3.0

Instance Method Summary collapse

Instance Method Details

#cache_control(*values) ⇒ 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.

Since:

  • 0.3.0



25
26
27
# File 'lib/hanami/action/cache/cache_control.rb', line 25

def cache_control(*values)
  @cache_control_directives ||= Directives.new(*values)
end

#cache_control_directivesObject

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.

Since:

  • 0.3.0



31
32
33
34
35
36
37
# File 'lib/hanami/action/cache/cache_control.rb', line 31

def cache_control_directives
  @cache_control_directives || Object.new.tap do |null_object|
    def null_object.headers
      {}
    end
  end
end