Class: Rubycritic::Turbulence
- Inherits:
-
Object
- Object
- Rubycritic::Turbulence
- Defined in:
- lib/rubycritic/turbulence.rb
Instance Method Summary collapse
- #churn ⇒ Object
- #complexity ⇒ Object
- #data ⇒ Object
-
#initialize(paths, source_control_system) ⇒ Turbulence
constructor
A new instance of Turbulence.
Constructor Details
#initialize(paths, source_control_system) ⇒ Turbulence
Returns a new instance of Turbulence.
7 8 9 10 |
# File 'lib/rubycritic/turbulence.rb', line 7 def initialize(paths, source_control_system) @paths = paths @source_control_system = source_control_system end |
Instance Method Details
#churn ⇒ Object
22 23 24 |
# File 'lib/rubycritic/turbulence.rb', line 22 def churn @churn ||= Analyser::Churn.new(@paths, @source_control_system).churn end |
#complexity ⇒ Object
26 27 28 |
# File 'lib/rubycritic/turbulence.rb', line 26 def complexity @complexity ||= QualityAdapter::Flog.new(@paths).complexity end |
#data ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/rubycritic/turbulence.rb', line 12 def data @paths.zip(churn, complexity).map do |path_info| { :name => path_info[0], :x => path_info[1], :y => path_info[2] } end end |