Class: Rubycritic::BaseGenerator
- Inherits:
-
Object
- Object
- Rubycritic::BaseGenerator
show all
- Defined in:
- lib/rubycritic/report_generators/base_generator.rb
Constant Summary
collapse
- REPORT_DIR =
File.expand_path("tmp/rubycritic", Dir.getwd)
- TEMPLATES_DIR =
File.expand_path("../templates", __FILE__)
Instance Method Summary
collapse
Instance Method Details
#file_directory ⇒ Object
15
16
17
|
# File 'lib/rubycritic/report_generators/base_generator.rb', line 15
def file_directory
raise NotImplementedError.new("You must implement the file_directory method.")
end
|
#file_href ⇒ Object
7
8
9
|
# File 'lib/rubycritic/report_generators/base_generator.rb', line 7
def file_href
"file://#{file_pathname}"
end
|
#file_name ⇒ Object
19
20
21
|
# File 'lib/rubycritic/report_generators/base_generator.rb', line 19
def file_name
raise NotImplementedError.new("You must implement the file_name method.")
end
|
#file_pathname ⇒ Object
11
12
13
|
# File 'lib/rubycritic/report_generators/base_generator.rb', line 11
def file_pathname
File.join(file_directory, file_name)
end
|
#get_binding ⇒ Object
39
40
41
|
# File 'lib/rubycritic/report_generators/base_generator.rb', line 39
def get_binding
binding
end
|
#index_path ⇒ Object
35
36
37
|
# File 'lib/rubycritic/report_generators/base_generator.rb', line 35
def index_path
File.join(REPORT_DIR, "index.html")
end
|
#javascript_path(file) ⇒ Object
27
28
29
|
# File 'lib/rubycritic/report_generators/base_generator.rb', line 27
def javascript_path(file)
File.join(REPORT_DIR, "assets/javascripts/#{file}.js")
end
|
#render ⇒ Object
23
24
25
|
# File 'lib/rubycritic/report_generators/base_generator.rb', line 23
def render
raise NotImplementedError.new("You must implement the render file_name method.")
end
|
#stylesheet_path(file) ⇒ Object
31
32
33
|
# File 'lib/rubycritic/report_generators/base_generator.rb', line 31
def stylesheet_path(file)
File.join(REPORT_DIR, "assets/stylesheets/#{file}.css")
end
|