Class: RubyCritic::Generator::Html::Overview
- Defined in:
- lib/rubycritic/generators/html/overview.rb
Constant Summary collapse
- TEMPLATE =
erb_template('overview.html.erb')
Constants inherited from Base
Base::LAYOUT_TEMPLATE, Base::TEMPLATES_DIR
Instance Method Summary collapse
- #file_name ⇒ Object
-
#initialize(analysed_modules) ⇒ Overview
constructor
A new instance of Overview.
- #render ⇒ Object
Methods inherited from Base
erb_template, #file_directory, #file_href, #file_pathname
Methods included from ViewHelpers
#asset_path, #file_path, #image_path, #javascript_tag, #smell_location_path, #stylesheet_path, #timeago_tag
Constructor Details
#initialize(analysed_modules) ⇒ Overview
Returns a new instance of Overview.
13 14 15 16 17 18 |
# File 'lib/rubycritic/generators/html/overview.rb', line 13 def initialize(analysed_modules) @turbulence_data = Turbulence.data(analysed_modules) @score = analysed_modules.score @max_score = AnalysedModulesCollection::MAX_SCORE @summary = analysed_modules.summary end |
Instance Method Details
#file_name ⇒ Object
20 21 22 |
# File 'lib/rubycritic/generators/html/overview.rb', line 20 def file_name 'overview.html' end |
#render ⇒ Object
24 25 26 27 |
# File 'lib/rubycritic/generators/html/overview.rb', line 24 def render index_body = TEMPLATE.result(get_binding) LAYOUT_TEMPLATE.result(get_binding { index_body }) end |