Class: VersionCake::ResponseStrategy::HttpHeaderStrategy
- Defined in:
- lib/versioncake/response_strategy/http_header_strategy.rb
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#execute(context, _status, headers, _response) ⇒ Object
4 5 6 |
# 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 ⇒ Object
8 9 10 |
# File 'lib/versioncake/response_strategy/http_header_strategy.rb', line 8 def header_key version_key.gsub('_', '-') end |