Class: Metior::Report::Default::Index

Inherits:
View
  • Object
show all
Defined in:
reports/default/views/index.rb

Overview

Author:

  • Sebastian Staudt

Instance Method Summary collapse

Methods inherited from View

inherited, #initialize, #method_missing, #render, #repository, requires, #respond_to?, #vcs_name

Methods included from ViewHelper

#count, #even_odd, #reset_count

Constructor Details

This class inherits a constructor from Metior::Report::View

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Metior::Report::View

Instance Method Details

#meta_nowObject



11
12
13
# File 'reports/default/views/index.rb', line 11

def meta_now
  now.strftime('%FT%H:%M:%S%z').insert(-3, ':')
end

#nowObject



15
16
17
# File 'reports/default/views/index.rb', line 15

def now
  Time.now
end

#repo_nameObject



19
20
21
# File 'reports/default/views/index.rb', line 19

def repo_name
  repository.name.empty? ? repository.path : repository.name
end

#titleObject



23
24
25
# File 'reports/default/views/index.rb', line 23

def title
  "Stats for #{repo_name}"
end

#versionObject



27
28
29
# File 'reports/default/views/index.rb', line 27

def version
  Metior::VERSION
end