Class: Jazzy::Doc

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

Instance Method Summary collapse

Instance Method Details

#dateObject



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

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

#jazzy_versionObject



24
25
26
27
# File 'lib/jazzy/doc.rb', line 24

def jazzy_version
  # Fake version is used to keep integration tests consistent
  ENV['JAZZY_FAKE_VERSION'] || Jazzy::VERSION
end

#yearObject



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

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