Sha256: 4f904fb2a180496d45c4c0460b7537f5edfeac4867d61dfcaba8184dd7465705
Contents?: true
Size: 887 Bytes
Versions: 8
Compression:
Stored size: 887 Bytes
Contents
module Skylight module Normalizers # The default normalizer, used if no other is found. class Default < Normalizer def initialize super(nil) # Pass no config and handle it in new method end def config Skylight.config end # @param trace [Skylight::Messages::Trace::Builder] ignored, only present to match API # @param name [String] # @param payload [Hash] # @option payload [String] :title # @option payload [String] :description # @return [Array, :skip] the normalized array or `:skip` if `name` is not part of a known {Skylight::TIERS tier} def normalize(_trace, name, payload) if name =~ Skylight::TIER_REGEX [ name, payload[:title], payload[:description] ] else :skip end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems