Module: Hanami::Action::Cache::Expires::ClassMethods Private

Defined in:
lib/hanami/action/cache/expires.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

#expires(amount, *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


31
32
33
# File 'lib/hanami/action/cache/expires.rb', line 31

def expires(amount, *values)
  @expires_directives ||= Directives.new(amount, *values)
end

#expires_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


37
38
39
40
41
42
43
# File 'lib/hanami/action/cache/expires.rb', line 37

def expires_directives
  @expires_directives || Object.new.tap do |null_object|
    def null_object.headers
      Hash.new
    end
  end
end