Class: Jazzy::Doc
- Inherits:
-
Mustache
- Object
- Mustache
- Jazzy::Doc
- Defined in:
- lib/jazzy/doc.rb
Instance Method Summary collapse
- #copyright ⇒ Object
- #jazzy_version ⇒ Object
- #language ⇒ Object
- #language_stub ⇒ Object
- #objc_first? ⇒ Boolean
Instance Method Details
#copyright ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/jazzy/doc.rb', line 13 def copyright config = Config.instance 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 |
#jazzy_version ⇒ Object
25 26 27 28 |
# File 'lib/jazzy/doc.rb', line 25 def jazzy_version # Fake version is used to keep integration tests consistent ENV['JAZZY_FAKE_VERSION'] || Jazzy::VERSION end |
#language ⇒ Object
34 35 36 |
# File 'lib/jazzy/doc.rb', line 34 def language objc_first? ? 'Objective-C' : 'Swift' end |
#language_stub ⇒ Object
38 39 40 |
# File 'lib/jazzy/doc.rb', line 38 def language_stub objc_first? ? 'objc' : 'swift' end |