Sha256: c5b90dd69540783fe5a540d4e4c791565edc9a5d052b8c656e3f25929b007a6f

Contents?: true

Size: 405 Bytes

Versions: 12

Compression:

Stored size: 405 Bytes

Contents

module Skylight
  module Normalizers
    class Default
      REGEX = /^(?:#{TIERS.join('|')})(?:\.|$)/

      def normalize(trace, name, payload)
        if name =~ REGEX
          annot = payload.dup
          [
            name,
            annot.delete(:title),
            annot.delete(:description),
            annot
          ]
        else
          :skip
        end
      end

    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
skylight-0.1.5.alpha2 lib/skylight/normalizers/default.rb
skylight-0.1.5.alpha1 lib/skylight/normalizers/default.rb
skylight-0.1.4 lib/skylight/normalizers/default.rb
skylight-0.1.4.alpha3 lib/skylight/normalizers/default.rb
skylight-0.1.4.alpha2 lib/skylight/normalizers/default.rb
skylight-0.1.4.alpha1 lib/skylight/normalizers/default.rb
skylight-0.1.3 lib/skylight/normalizers/default.rb
skylight-0.1.2 lib/skylight/normalizers/default.rb
skylight-0.1.1 lib/skylight/normalizers/default.rb
skylight-0.1.0 lib/skylight/normalizers/default.rb
skylight-0.1.0.alpha2 lib/skylight/normalizers/default.rb
skylight-0.1.0.alpha1 lib/skylight/normalizers/default.rb