Module: Hoe::Flay

Defined in:
lib/hoe/flay.rb

Overview

Flay plugin for hoe.

Tasks Provided:

flay

Analyze for code duplication.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#flay_thresholdObject

Optional: flay threshold to determine threshold failure. [default: 1200-100]



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

def flay_threshold
  @flay_threshold
end

Instance Method Details

#define_flay_tasksObject

Define tasks for plugin.



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

def define_flay_tasks
  begin
    require 'flay_task'
    FlayTask.new :flay, self.flay_threshold
  rescue Exception
    # skip
  end
end

#initialize_flayObject

Initialize variables for plugin.



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

def initialize_flay
  self.flay_threshold ||= timebomb 1200, 100  # 80% of average :(
end