Class: Jazzy::Doc

Inherits:
Mustache
  • Object
show all
Defined in:
lib/jazzy/doc.rb

Instance Method Summary collapse

Instance Method Details

#dateObject



11
12
13
14
# File 'lib/jazzy/doc.rb', line 11

def date
  # Fake date is used to keep integration tests consistent
  ENV['JAZZY_FAKE_DATE'] || DateTime.now.strftime('%Y-%m-%d')
end

#jazzy_versionObject



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

#yearObject



16
17
18
19
20
21
22
23
# File 'lib/jazzy/doc.rb', line 16

def year
  # Fake date is used to keep integration tests consistent
  if ENV['JAZZY_FAKE_DATE']
    ENV['JAZZY_FAKE_DATE'][0..3]
  else
    DateTime.now.strftime('%Y')
  end
end