Class: TestData::Statistics

Inherits:
Object
  • Object
show all
Defined in:
lib/test_data/statistics.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStatistics

Returns a new instance of Statistics.



9
10
11
# File 'lib/test_data/statistics.rb', line 9

def initialize
  reset
end

Instance Attribute Details

#load_countObject (readonly)

Returns the value of attribute load_count.



7
8
9
# File 'lib/test_data/statistics.rb', line 7

def load_count
  @load_count
end

#load_rails_fixtures_countObject (readonly)

Returns the value of attribute load_rails_fixtures_count.



7
8
9
# File 'lib/test_data/statistics.rb', line 7

def load_rails_fixtures_count
  @load_rails_fixtures_count
end

#truncate_countObject (readonly)

Returns the value of attribute truncate_count.



7
8
9
# File 'lib/test_data/statistics.rb', line 7

def truncate_count
  @truncate_count
end

Instance Method Details

#count_load!Object



13
14
15
# File 'lib/test_data/statistics.rb', line 13

def count_load!
  @load_count += 1
end

#count_load_rails_fixtures!Object



21
22
23
# File 'lib/test_data/statistics.rb', line 21

def count_load_rails_fixtures!
  @load_rails_fixtures_count += 1
end

#count_truncate!Object



17
18
19
# File 'lib/test_data/statistics.rb', line 17

def count_truncate!
  @truncate_count += 1
end

#resetObject



25
26
27
28
29
# File 'lib/test_data/statistics.rb', line 25

def reset
  @load_count = 0
  @truncate_count = 0
  @load_rails_fixtures_count = 0
end