Class: Steep::Services::StatsCalculator::SuccessStats
- Defined in:
- lib/steep/services/stats_calculator.rb
Instance Attribute Summary collapse
-
#error_calls_count ⇒ Object
Returns the value of attribute error_calls_count.
-
#path ⇒ Object
Returns the value of attribute path.
-
#target ⇒ Object
Returns the value of attribute target.
-
#typed_calls_count ⇒ Object
Returns the value of attribute typed_calls_count.
-
#untyped_calls_count ⇒ Object
Returns the value of attribute untyped_calls_count.
Instance Method Summary collapse
Instance Attribute Details
#error_calls_count ⇒ Object
Returns the value of attribute error_calls_count
4 5 6 |
# File 'lib/steep/services/stats_calculator.rb', line 4 def error_calls_count @error_calls_count end |
#path ⇒ Object
Returns the value of attribute path
4 5 6 |
# File 'lib/steep/services/stats_calculator.rb', line 4 def path @path end |
#target ⇒ Object
Returns the value of attribute target
4 5 6 |
# File 'lib/steep/services/stats_calculator.rb', line 4 def target @target end |
#typed_calls_count ⇒ Object
Returns the value of attribute typed_calls_count
4 5 6 |
# File 'lib/steep/services/stats_calculator.rb', line 4 def typed_calls_count @typed_calls_count end |
#untyped_calls_count ⇒ Object
Returns the value of attribute untyped_calls_count
4 5 6 |
# File 'lib/steep/services/stats_calculator.rb', line 4 def untyped_calls_count @untyped_calls_count end |
Instance Method Details
#as_json ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/steep/services/stats_calculator.rb', line 5 def as_json { type: "success", target: target.name.to_s, path: path.to_s, typed_calls: typed_calls_count, untyped_calls: untyped_calls_count, error_calls: error_calls_count, total_calls: typed_calls_count + untyped_calls_count + error_calls_count } end |