Sha256: 788042acbfd08dc88bf1a700c141737e39ac3c55e51a660764a0148685c48c33

Contents?: true

Size: 283 Bytes

Versions: 9

Compression:

Stored size: 283 Bytes

Contents

module VersionCake
  module ResponseStrategy
    class HttpHeaderStrategy < Base
      def execute(context, _status, headers, _response)
        headers[header_key] = context.version.to_s
      end

      def header_key
        version_key.gsub('_', '-')
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
versioncake-4.1.1 lib/versioncake/response_strategy/http_header_strategy.rb
versioncake-4.1.0 lib/versioncake/response_strategy/http_header_strategy.rb
versioncake-4.0.2 lib/versioncake/response_strategy/http_header_strategy.rb
versioncake-4.0.1 lib/versioncake/response_strategy/http_header_strategy.rb
versioncake-4.0.0 lib/versioncake/response_strategy/http_header_strategy.rb
versioncake-3.4.0 lib/versioncake/response_strategy/http_header_strategy.rb
versioncake-3.3.0 lib/versioncake/response_strategy/http_header_strategy.rb
versioncake-3.2.0 lib/versioncake/response_strategy/http_header_strategy.rb
versioncake-3.1.0 lib/versioncake/response_strategy/http_header_strategy.rb