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

- (Object) flay_threshold

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

- (Object) define_flay_tasks

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

- (Object) initialize_flay

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