lib/fukuzatsu/parsed_file.rb in fukuzatsu-0.9.13 vs lib/fukuzatsu/parsed_file.rb in fukuzatsu-0.9.14

- old
+ new

@@ -1,28 +1,37 @@ class ParsedFile include PoroPlus include Ephemeral::Base - attr_accessor :path_to_file, :class_name + attr_accessor :complexity, :path_to_file, :class_name, :path_to_results def class_name @class_name ||= analyzer.extract_class_name end def content @content ||= File.open(path_to_file, "r").read end def analyzer - Analyzer.new(content) + @analyzer ||= Analyzer.new(content) end def complexity @complexity ||= analyzer.complexity end def methods @methods ||= analyzer.extract_methods + end + + def summary + { + results_file: self.path_to_results, + path_to_file: self.path_to_file, + class_name: self.class_name, + complexity: complexity + } end end \ No newline at end of file