Class: Skylight::Normalizers::Default Private
- Inherits:
-
Normalizer
- Object
- Normalizer
- Skylight::Normalizers::Default
- Defined in:
- lib/skylight/normalizers/default.rb
Overview
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.
The default normalizer, used if no other is found.
Instance Method Summary collapse
- #config ⇒ Object private
-
#initialize ⇒ Default
constructor
private
A new instance of Default.
-
#normalize(_trace, name, payload) ⇒ Array, :skip
private
The normalized array or ‘:skip` if `name` is not part of a known tier.
Methods inherited from Normalizer
#normalize_after, #normalize_with_meta, register
Methods included from Util::Logging
#config_for_logging, #debug, #error, #fmt, #info, #log, #log_context, #raise_on_error?, #t, #trace, #trace?, #warn
Constructor Details
#initialize ⇒ Default
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 Default.
5 6 7 |
# File 'lib/skylight/normalizers/default.rb', line 5 def initialize super(nil) # Pass no config and handle it in new method end |
Instance Method Details
#config ⇒ 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.
9 10 11 |
# File 'lib/skylight/normalizers/default.rb', line 9 def config Skylight.config end |
#normalize(_trace, name, payload) ⇒ Array, :skip
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 the normalized array or ‘:skip` if `name` is not part of a known tier.
19 20 21 |
# File 'lib/skylight/normalizers/default.rb', line 19 def normalize(_trace, name, payload) name =~ Skylight::TIER_REGEX ? [name, payload[:title], payload[:description]] : :skip end |