class Rack::ServiceApiVersioning::EncodedApiVersionData::ReturnData
Immutable, structured data type for returned version data.
Constants
- SBU_FMT
Public Instance Methods
content_type()
click to toggle source
# File lib/rack/service_api_versioning/encoded_api_version_data/return_data.rb, line 26 def content_type content_parts.join('.') + '+json' end
to_hash()
click to toggle source
Calls superclass method
# File lib/rack/service_api_versioning/encoded_api_version_data/return_data.rb, line 30 def to_hash super.merge(content_type: content_type) .reject { |key, _| key == :vendor_org } end
Also aliased as: to_h
Private Instance Methods
content_parts()
click to toggle source
# File lib/rack/service_api_versioning/encoded_api_version_data/return_data.rb, line 38 def content_parts ['application/vnd', vendor_org, name, api_version.to_s] end