Class: RspecSprint::Normalizer::Factory
- Inherits:
-
Struct
- Object
- Struct
- RspecSprint::Normalizer::Factory
- Defined in:
- lib/rspec_sprint/normalizer.rb
Overview
One factory’s profile. top_level_ratio is the cascade signal: low ratio means the factory is built mostly via associations, not directly.
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#top_level_count ⇒ Object
Returns the value of attribute top_level_count.
-
#total_count ⇒ Object
Returns the value of attribute total_count.
-
#total_time ⇒ Object
Returns the value of attribute total_time.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
13 14 15 |
# File 'lib/rspec_sprint/normalizer.rb', line 13 def name @name end |
#top_level_count ⇒ Object
Returns the value of attribute top_level_count
13 14 15 |
# File 'lib/rspec_sprint/normalizer.rb', line 13 def top_level_count @top_level_count end |
#total_count ⇒ Object
Returns the value of attribute total_count
13 14 15 |
# File 'lib/rspec_sprint/normalizer.rb', line 13 def total_count @total_count end |
#total_time ⇒ Object
Returns the value of attribute total_time
13 14 15 |
# File 'lib/rspec_sprint/normalizer.rb', line 13 def total_time @total_time end |
Instance Method Details
#top_level_ratio ⇒ Object
14 15 16 17 18 |
# File 'lib/rspec_sprint/normalizer.rb', line 14 def top_level_ratio return 0.0 if total_count.nil? || total_count.zero? top_level_count.to_f / total_count end |