Class: VersionCake::ResponseStrategy::HttpContentTypeStrategy
- Defined in:
- lib/versioncake/response_strategy/http_content_type_strategy.rb
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#execute(context, _status, headers, _response) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/versioncake/response_strategy/http_content_type_strategy.rb', line 4 def execute(context, _status, headers, _response) return if headers['Content-Type'].nil? headers['Content-Type'] << ';' unless headers['Content-Type'].end_with? ';' headers['Content-Type'] << " #{version_key}=#{context.version.to_s}" end |