Class: Rubycritic::Generator::SmellsIndex
- Defined in:
- lib/rubycritic/report_generators/smells_index.rb
Constant Summary collapse
- TEMPLATE =
erb_template("smells_index.html.erb")
Constants inherited from Base
Base::LAYOUT_TEMPLATE, Base::TEMPLATES_DIR
Instance Method Summary collapse
- #file_name ⇒ Object
-
#initialize(smells) ⇒ SmellsIndex
constructor
A new instance of SmellsIndex.
- #render ⇒ Object
Methods inherited from Base
erb_template, #file_directory, #file_href, #file_pathname
Methods included from ViewHelpers
#asset_path, #file_path, #javascript_tag, #smell_location_path, #stylesheet_path, #timeago_tag
Constructor Details
#initialize(smells) ⇒ SmellsIndex
Returns a new instance of SmellsIndex.
9 10 11 |
# File 'lib/rubycritic/report_generators/smells_index.rb', line 9 def initialize(smells) @smells = smells end |
Instance Method Details
#file_name ⇒ Object
13 14 15 |
# File 'lib/rubycritic/report_generators/smells_index.rb', line 13 def file_name "smells_index.html" end |
#render ⇒ Object
17 18 19 20 |
# File 'lib/rubycritic/report_generators/smells_index.rb', line 17 def render index_body = TEMPLATE.result(get_binding) LAYOUT_TEMPLATE.result(get_binding { index_body }) end |