Sha256: 0286c12d9c2ae7faa3fc85863a395a96334bf6a21aaed6ccc56d88d6364dbd74
Contents?: true
Size: 686 Bytes
Versions: 1
Compression:
Stored size: 686 Bytes
Contents
# frozen_string_literal: true module Hanami class Config class Actions # Wrapper for app-level config of HTTP cookies for Hanami actions. # # This decorates the hash of cookie options that is otherwise directly configurable on # actions, and adds the `enabled?` method to allow app base action to determine whether to # include the `Action::Cookies` module. # # @since 2.0.0 class Cookies attr_reader :options def initialize(options) @options = options end def enabled? !options.nil? end def to_h options.to_h end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hanami-2.0.0.beta4 | lib/hanami/config/actions/cookies.rb |