Sha256: 228a7bc7c6a1b8b603a415d2e3ebe9f94537f8ea2bc7008a06d957c6da2dfff4
Contents?: true
Size: 936 Bytes
Versions: 16
Compression:
Stored size: 936 Bytes
Contents
module Nexmo module OAS module Renderer module Presenters class ApiSpecification def initialize(document_name:) @document_name = document_name end def side_navigation "api/#{@document_name}" end def document_path "_api/#{@document_name}.md" end def document @document ||= File.read(document_path) end def frontmatter @frontmatter ||= YAML.safe_load(document) end def side_navigation_title @side_navigation_title ||= frontmatter.fetch('api') end def document_title @document_title ||= "#{side_navigation_title} > #{frontmatter.fetch('title')}" end def content @content ||= MarkdownPipeline.new.call(document) end end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems