Class: StackifyRubyAPM::Normalizers::Collection Private
- Inherits:
-
Object
- Object
- StackifyRubyAPM::Normalizers::Collection
- Defined in:
- lib/stackify_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.
44 45 46 47 |
# File 'lib/stackify_apm/normalizers.rb', line 44 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.
49 50 51 52 53 54 |
# File 'lib/stackify_apm/normalizers.rb', line 49 def for(name) # Performance suggestion by fasterer # Hash#fetch with second argument is slower than Hash#fetch with block. # @normalizers.fetch(name, @default) @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.
56 57 58 |
# File 'lib/stackify_apm/normalizers.rb', line 56 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.
60 61 62 |
# File 'lib/stackify_apm/normalizers.rb', line 60 def normalize(transaction, name, payload) self.for(name).normalize(transaction, name, payload) end |