class MetricFu::Churn
Public Class Methods
new(options={})
click to toggle source
Calls superclass method
MetricFu::Generator::new
# File lib/generators/churn.rb, line 5 def initialize(options={}) super end
Public Instance Methods
analyze()
click to toggle source
# File lib/generators/churn.rb, line 15 def analyze if @output.match(/Churning requires a subversion or git repo/) @churn = [:churn => {}] else @churn = YAML::load(@output) end end
emit()
click to toggle source
# File lib/generators/churn.rb, line 9 def emit @output = `churn --yaml` yaml_start = @output.index("---") @output = @output[yaml_start...@output.length] if yaml_start end
to_h()
click to toggle source
# File lib/generators/churn.rb, line 23 def to_h {:churn => @churn[:churn]} end