Class: Skylight::Core::Normalizers::ActiveStorage Private

Inherits:
Normalizer
  • Object
show all
Defined in:
lib/skylight/core/normalizers/active_storage.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.

Constant Summary collapse

TITLES =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  "preview.active_storage"                    => "Preview",
  "transform.active_storage"                  => "Transform",
  "service_download.active_storage"           => "Download",
  "service_upload.active_storage"             => "Upload",
  "service_streaming_download.active_storage" => "Streaming Download",
  "service_download_chunk.active_storage"     => "Download Chunk",
  "service_delete.active_storage"             => "Delete",
  "service_delete_prefixed.active_storage"    => "Delete Prefixed",
  "service_exist.active_storage"              => "Exist",
  "service_url.active_storage"                => "Url"
}.freeze

Instance Attribute Summary

Attributes inherited from Normalizer

#config

Instance Method Summary collapse

Methods inherited from Normalizer

#initialize, #normalize_after, register

Constructor Details

This class inherits a constructor from Skylight::Core::Normalizers::Normalizer

Instance Method Details

#normalize(_trace, 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.


21
22
23
24
25
26
27
# File 'lib/skylight/core/normalizers/active_storage.rb', line 21

def normalize(_trace, name, _payload)
  title = ["ActiveStorage", TITLES[name]].join(" ")

  cat = "app.#{name.split('.').reverse.join('.')}"

  [cat, title, nil]
end