Sha256: 45205a4c20b19941f3cea1ce303c6fab86a86c81202837a5f0cf9bb74053874f
Contents?: true
Size: 622 Bytes
Versions: 15
Compression:
Stored size: 622 Bytes
Contents
module RspecApiDocs module Renderer class SlateRenderer attr_reader :resources def initialize(resources) @resources = resources end def render FileUtils.mkdir_p output_file.dirname File.open(output_file, 'w') do |f| f.write ERB.new(File.read(template), nil, '-').result(binding) end end private def output_file Pathname.new(RspecApiDocs.configuration.output_dir) + 'index.html.md' end def template File.expand_path('../slate_renderer/slate_index.html.md.erb', __FILE__) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems