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
-
#flay_threshold ⇒ Object
Optional: flay threshold to determine threshold failure.
Instance Method Summary collapse
-
#define_flay_tasks ⇒ Object
Define tasks for plugin.
-
#initialize_flay ⇒ Object
Initialize variables for plugin.
Instance Attribute Details
#flay_threshold ⇒ Object
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_tasks ⇒ Object
Define tasks for plugin.
24 25 26 27 28 29 |
# File 'lib/hoe/flay.rb', line 24 def define_flay_tasks require "flay_task" FlayTask.new :flay, self.flay_threshold rescue Exception # skip end |
#initialize_flay ⇒ Object
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 |