Class: Skylight::Normalizers::Shrine Private

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

{
  "upload.shrine" => "Upload",
  "download.shrine" => "Download",
  "open.shrine" => "Open",
  "exists.shrine" => "Exists",
  "delete.shrine" => "Delete",
  "metadata.shrine" => "Metadata",
  "mime_type.shrine" => "MIME Type",
  "image_dimensions.shrine" => "Image Dimensions",
  "signature.shrine" => "Signature",
  "extension.shrine" => "Extension",
  "derivation.shrine" => "Derivation",
  "derivatives.shrine" => "Derivatives",
  "data_uri.shrine" => "Data URI",
  "remote_url.shrine" => "Remote 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.



23
24
25
26
27
28
29
# File 'lib/skylight/normalizers/shrine.rb', line 23

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

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

  [cat, title, nil]
end