Module: Rubycritic::ViewHelpers
- Included in:
- BaseGenerator
- Defined in:
- lib/rubycritic/report_generators/view_helpers.rb
Instance Method Summary collapse
- #asset_path(file) ⇒ Object
- #index_path ⇒ Object
- #javascript_path(file) ⇒ Object
- #smell_location_path(location) ⇒ Object
- #stylesheet_path(file) ⇒ Object
Instance Method Details
#asset_path(file) ⇒ Object
12 13 14 |
# File 'lib/rubycritic/report_generators/view_helpers.rb', line 12 def asset_path(file) File.join(root_directory, "assets", file) end |
#index_path ⇒ Object
21 22 23 |
# File 'lib/rubycritic/report_generators/view_helpers.rb', line 21 def index_path File.join(root_directory, "index.html") end |
#javascript_path(file) ⇒ Object
4 5 6 |
# File 'lib/rubycritic/report_generators/view_helpers.rb', line 4 def javascript_path(file) asset_path(File.join("javascripts", "#{file}.js")) end |
#smell_location_path(location) ⇒ Object
16 17 18 19 |
# File 'lib/rubycritic/report_generators/view_helpers.rb', line 16 def smell_location_path(location) pathname = location.pathname File.join(root_directory, File.dirname(pathname), "#{pathname.basename.sub_ext("")}.html#L#{location.line}") end |
#stylesheet_path(file) ⇒ Object
8 9 10 |
# File 'lib/rubycritic/report_generators/view_helpers.rb', line 8 def stylesheet_path(file) asset_path(File.join("stylesheets", "#{file}.css")) end |