Sha256: ed588dee0919f9547247d8106655d0fde1aa44015b10603c4b0d51aadd3006f9
Contents?: true
Size: 1007 Bytes
Versions: 4
Compression:
Stored size: 1007 Bytes
Contents
require_relative './response_tab/link' require_relative './response_tab/panel' module Nexmo module OAS module Renderer module Presenters class ResponseTabs attr_reader :format def initialize(format, response, content) @format = format @response = response @content = content end def tab_links @tab_links ||= @response.split_schemas(@format).map.with_index do |schema, index| ResponseTab::Link.new( index: index, schema: schema ) end end def tab_panels @tab_panels ||= @response.split_schemas(@format).map.with_index do |schema, index| ResponseTab::Panel.new( schema: schema, index: index, format: @format, content: @content ) end end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems