Class: RailsStats::SpecStatistics

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_stats/spec_statistics.rb

Constant Summary collapse

SPEC_FOLDERS =
['controllers',
'features',
'helpers',
'models',
'requests',
'routing',
'integrations',
'integration',
'mailers',
'lib',
'acceptance',
'factories']

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(directory, key_concepts) ⇒ SpecStatistics

Returns a new instance of SpecStatistics.



18
19
20
21
22
23
24
# File 'lib/rails_stats/spec_statistics.rb', line 18

def initialize(directory, key_concepts)
  @test = true
  @directory    = directory
  @key_concepts = key_concepts
  @statistics   = calculate_statistics
  @total        = calculate_total
end

Instance Attribute Details

#statisticsObject (readonly)

Returns the value of attribute statistics.



3
4
5
# File 'lib/rails_stats/spec_statistics.rb', line 3

def statistics
  @statistics
end

#testObject (readonly)

Returns the value of attribute test.



3
4
5
# File 'lib/rails_stats/spec_statistics.rb', line 3

def test
  @test
end

#totalObject (readonly)

Returns the value of attribute total.



3
4
5
# File 'lib/rails_stats/spec_statistics.rb', line 3

def total
  @total
end