Class: Glyph::Reporter
Overview
This class is used to display statistics collected by a Glyph::Analyzer.
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#display ⇒ Object
Displays the statistics.
-
#initialize(stats) ⇒ Reporter
constructor
Initializes the reporter.
Methods included from Utils
#clean_xml_document, #complex_output?, #current_output_setting, #debug, #error, #file_copy, #file_load, #file_write, #info, #load_files_from_dir, #macro_alias?, #macro_aliases_for, #macro_definition_for, #macro_eq?, #msg, #multiple_output_files?, #project?, #run_external_command, #titled_sections, #warning, #with_files_from, #yaml_dump, #yaml_load
Constructor Details
#initialize(stats) ⇒ Reporter
Initializes the reporter
15 16 17 18 |
# File 'lib/glyph/reporter.rb', line 15 def initialize(stats) @stats = stats @detailed = true end |
Instance Attribute Details
#detailed ⇒ Object
11 12 13 |
# File 'lib/glyph/reporter.rb', line 11 def detailed @detailed end |
Instance Method Details
#display ⇒ Object
Displays the statistics
21 22 23 24 25 26 27 28 29 |
# File 'lib/glyph/reporter.rb', line 21 def display [:files, :macros, :snippets, :bookmarks, :links, :macro, :snippet, :bookmark, :link].each do |s| unless @stats[s].blank? then send :"display_#{s}" puts end end end |