Class: Codescout::FlayStats

Inherits:
Object
  • Object
show all
Defined in:
lib/codescout/flay_stats.rb

Constant Summary collapse

OPTIONS =
{
  :diff    => true,
  :mass    => 16,
  :summary => false,
  :verbose => false,
  :number  => true,
  :timeout => 10,
  :liberal => false,
  :fuzzy   => false,
  :only    => nil
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(analyzer) ⇒ FlayStats

Returns a new instance of FlayStats.



19
20
21
22
23
24
25
26
27
28
# File 'lib/codescout/flay_stats.rb', line 19

def initialize(analyzer)
  @matches   = []
  @base_path = analyzer.base_path

  @flay = Flay.new(OPTIONS)
  @flay.process(*analyzer.files)
  
  process_matches(@flay.analyze)
  @flay = nil
end

Instance Attribute Details

#matchesObject (readonly)

Returns the value of attribute matches.



17
18
19
# File 'lib/codescout/flay_stats.rb', line 17

def matches
  @matches
end