Class: RailsStats::TestStatistics

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

Constant Summary collapse

SPEC_FOLDERS =
['controllers',
'functional',
'helpers',
'models',
'requests',
'unit',
'integrations',
'integration',
'mailers',
'lib']

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(directory, key_concepts) ⇒ TestStatistics

Returns a new instance of TestStatistics.



16
17
18
19
20
21
22
# File 'lib/rails_stats/test_statistics.rb', line 16

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

Instance Attribute Details

#directoryObject (readonly)

Returns the value of attribute directory.



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

def directory
  @directory
end

#statisticsObject (readonly)

Returns the value of attribute statistics.



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

def statistics
  @statistics
end

#testObject (readonly)

Returns the value of attribute test.



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

def test
  @test
end

#totalObject (readonly)

Returns the value of attribute total.



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

def total
  @total
end