Class: ScoutApm::Serializers::ExternalServiceSerializerToJson
- Inherits:
-
Object
- Object
- ScoutApm::Serializers::ExternalServiceSerializerToJson
- Defined in:
- lib/scout_apm/serializers/external_service_serializer_to_json.rb
Instance Attribute Summary collapse
-
#external_service_metrics ⇒ Object
readonly
Returns the value of attribute external_service_metrics.
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(external_service_metrics) ⇒ ExternalServiceSerializerToJson
constructor
A new instance of ExternalServiceSerializerToJson.
Constructor Details
#initialize(external_service_metrics) ⇒ ExternalServiceSerializerToJson
Returns a new instance of ExternalServiceSerializerToJson.
6 7 8 |
# File 'lib/scout_apm/serializers/external_service_serializer_to_json.rb', line 6 def initialize(external_service_metrics) @external_service_metrics = external_service_metrics end |
Instance Attribute Details
#external_service_metrics ⇒ Object (readonly)
Returns the value of attribute external_service_metrics.
4 5 6 |
# File 'lib/scout_apm/serializers/external_service_serializer_to_json.rb', line 4 def external_service_metrics @external_service_metrics end |
Instance Method Details
#as_json ⇒ Object
10 11 12 |
# File 'lib/scout_apm/serializers/external_service_serializer_to_json.rb', line 10 def as_json external_service_metrics.map{|metric| metric.as_json } end |