Sha256: 98d7d87355d1d58b3316a23bca90e50c387daf5311a0212abea48a15c820d42a
Contents?: true
Size: 1.43 KB
Versions: 4
Compression:
Stored size: 1.43 KB
Contents
require 'date' require 'pathname' require 'mustache' require 'jazzy/config' require 'jazzy/gem_version' require 'jazzy/jazzy_markdown' module Jazzy class Doc < Mustache include Config::Mixin self.template_name = 'doc' def copyright copyright = config.copyright || ( # Fake date is used to keep integration tests consistent date = ENV['JAZZY_FAKE_DATE'] || DateTime.now.strftime('%Y-%m-%d') year = date[0..3] "© #{year} [#{config.author_name}](#{config.author_url}). " \ "All rights reserved. (Last updated: #{date})" ) Markdown.render_copyright(copyright).chomp end def jazzy_version # Fake version is used to keep integration tests consistent ENV['JAZZY_FAKE_VERSION'] || Jazzy::VERSION end def objc_first? config.objc_mode && config.hide_declarations != 'objc' end def language objc_first? ? 'Objective-C' : 'Swift' end def language_stub objc_first? ? 'objc' : 'swift' end def module_version config.version_configured ? config.version : nil end def docs_title if config.title_configured config.title elsif config.version_configured # Fake version for integration tests version = ENV['JAZZY_FAKE_MODULE_VERSION'] || config.version "#{config.module_name} #{version} Docs" else "#{config.module_name} Docs" end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
jazzy-0.11.2 | lib/jazzy/doc.rb |
jazzy-0.11.1 | lib/jazzy/doc.rb |
jazzy-0.11.0 | lib/jazzy/doc.rb |
jazzy-0.10.0 | lib/jazzy/doc.rb |