Class: Jazzy::Doc
- Inherits:
-
Mustache
- Object
- Mustache
- Jazzy::Doc
- Includes:
- Config::Mixin
- Defined in:
- lib/jazzy/doc.rb
Instance Method Summary collapse
- #copyright ⇒ Object
- #docs_title ⇒ Object
- #jazzy_version ⇒ Object
- #language ⇒ Object
- #language_stub ⇒ Object
- #module_version ⇒ Object
- #objc_first? ⇒ Boolean
Methods included from Config::Mixin
Instance Method Details
#copyright ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/jazzy/doc.rb', line 15 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.}](#{config.}). " \ "All rights reserved. (Last updated: #{date})" ) Markdown.render_copyright(copyright).chomp end |
#docs_title ⇒ Object
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/jazzy/doc.rb', line 47 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 |
#jazzy_version ⇒ Object
26 27 28 29 |
# File 'lib/jazzy/doc.rb', line 26 def jazzy_version # Fake version is used to keep integration tests consistent ENV['JAZZY_FAKE_VERSION'] || Jazzy::VERSION end |
#language ⇒ Object
35 36 37 |
# File 'lib/jazzy/doc.rb', line 35 def language objc_first? ? 'Objective-C' : 'Swift' end |
#language_stub ⇒ Object
39 40 41 |
# File 'lib/jazzy/doc.rb', line 39 def language_stub objc_first? ? 'objc' : 'swift' end |
#module_version ⇒ Object
43 44 45 |
# File 'lib/jazzy/doc.rb', line 43 def module_version config.version_configured ? config.version : nil end |
#objc_first? ⇒ Boolean
31 32 33 |
# File 'lib/jazzy/doc.rb', line 31 def objc_first? config.objc_mode && config.hide_declarations != 'objc' end |