Sha256: 841b4303bf64c34c17f1f913db0ec9c3318cfc5bc44ca66284c337cec3cb8571
Contents?: true
Size: 565 Bytes
Versions: 31
Compression:
Stored size: 565 Bytes
Contents
module Nexmo module OAS module Renderer module Presenters class ResponseFormat MAPPINGS = { 'application/json' => 'JSON', 'application/xml' => 'XML', 'text/xml' => 'XML', } def self.to_dropdown(formats) MAPPINGS.slice(*formats) end def initialize(responses) @responses = responses end def extract @formats ||= @responses.flat_map(&:formats).uniq end end end end end end
Version data entries
31 entries across 31 versions & 1 rubygems