Class: ElasticAPM::Normalizers::Collection Private
- Inherits:
-
Object
- Object
- ElasticAPM::Normalizers::Collection
- Defined in:
- lib/elastic_apm/normalizers.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Classes: SkipNormalizer
Instance Method Summary collapse
- #for(name) ⇒ Object private
-
#initialize(normalizers) ⇒ Collection
constructor
private
A new instance of Collection.
- #keys ⇒ Object private
- #normalize(transaction, name, payload) ⇒ Object private
Constructor Details
#initialize(normalizers) ⇒ Collection
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Collection.
41 42 43 44 |
# File 'lib/elastic_apm/normalizers.rb', line 41 def initialize(normalizers) @normalizers = normalizers @default = SkipNormalizer.new end |
Instance Method Details
#for(name) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
46 47 48 |
# File 'lib/elastic_apm/normalizers.rb', line 46 def for(name) @normalizers.fetch(name) { @default } end |
#keys ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
50 51 52 |
# File 'lib/elastic_apm/normalizers.rb', line 50 def keys @normalizers.keys end |
#normalize(transaction, name, payload) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
54 55 56 |
# File 'lib/elastic_apm/normalizers.rb', line 54 def normalize(transaction, name, payload) self.for(name).normalize(transaction, name, payload) end |