Module: Hoe::Flog

Defined in:
lib/hoe/flog.rb

Overview

Flog plugin for hoe.

Tasks Provided:

flog

Analyze code complexity.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Instance Attribute Details

- (Object) flog_threshold

Optional: flog threshold to determine threshold failure. [default: 1500-200]



12
13
14
# File 'lib/hoe/flog.rb', line 12

def flog_threshold
  @flog_threshold
end

Instance Method Details

- (Object) define_flog_tasks

Define tasks for plugin.



24
25
26
27
28
29
30
31
# File 'lib/hoe/flog.rb', line 24

def define_flog_tasks
  begin
    require 'flog_task'
    FlogTask.new :flog, self.flog_threshold
  rescue Exception
    # skip
  end
end

- (Object) initialize_flog

Initialize variables for plugin.



17
18
19
# File 'lib/hoe/flog.rb', line 17

def initialize_flog
  self.flog_threshold ||= timebomb 1500, 1000 # 80% of average :(
end