Class: Skylight::Normalizers::ActiveStorage Private

Inherits:
Normalizer show all
Defined in:
lib/skylight/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, #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

This class inherits a constructor from Skylight::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.



19
20
21
22
23
24
25
# File 'lib/skylight/normalizers/active_storage.rb', line 19

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

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

  [cat, title, nil]
end