class VersionCake::ResponseStrategy::HttpHeaderStrategy

Public Instance Methods

execute(context, _status, headers, _response) click to toggle source
# File lib/versioncake/response_strategy/http_header_strategy.rb, line 4
def execute(context, _status, headers, _response)
  headers[header_key] = context.version.to_s
end
header_key() click to toggle source
# File lib/versioncake/response_strategy/http_header_strategy.rb, line 8
def header_key
  version_key.gsub('_', '-')
end