Module: DevSuite::Utils::Emoji

Defined in:
lib/dev_suite/utils/emoji.rb

Constant Summary collapse

STATUS =

Status-related emojis

{
  start: "πŸš€",
  success: "βœ…",
  error: "🚨❌",
  retry: "πŸ’₯",
  warning: "⚠️", # For warnings
  caution: "🟑", # For caution or proceed with care
  pending: "πŸ•’", # For pending or waiting
  paused: "⏸️",  # For paused or halted
  running: "πŸƒ",  # For running or in progress
  done: "πŸŽ‰",     # For done or completed
  finish: "🏁",   # For finish or end
  stop: "πŸ›‘",     # For stopping or halting
  cancel: "🚫",   # For canceling or aborting
  skip: "⏭️",    # For skipping or jumping
  next: "⏩",     # For next or moving forward
  previous: "βͺ", # For previous or moving backward
  up: "⬆️",      # For up or moving up
  down: "⬇️",    # For down or moving down
  left: "⬅️",    # For left or moving left
  right: "➑️",   # For right or moving right
  top: "πŸ”",      # For top or highest
  bottom: "πŸ”š",   # For bottom or lowest
  middle: "πŸ”½", # For middle or center
  full: "πŸ”΄",     # For full or maximum
  empty: "βšͺ",    # For empty or minimum
}.freeze
ACTIONS =

Action-related emojis

{
  update: "πŸ”„",     # For updates or changes
  fix: "πŸ”§",        # For fixes or repairs
  bug: "🐞",        # For bugs or issues
  code: "πŸ’»",       # For code or technical content
}.freeze
NOTIFICATIONS =

Notification-related emojis

{
  info: "ℹ️",
  important: "❗",
  note: "πŸ“",       # For notes or annotations
  tip: "πŸ’‘",        # For tips or helpful hints
}.freeze
RESOURCES =

Resource-related emojis

{
  document: "πŸ“„",   # For representing documents or files
  network: "🌐",    # For network-related logs
  database: "πŸ’Ύ",   # For database-related logs
  cache: "πŸ—„οΈ",     # For cache-related logs
  file: "πŸ“",       # For file-related logs
  cookie: "πŸͺ",     # For cookie-related logs
  header: "πŸ“‘",     # For header-related logs
  request: "πŸ“€",    # For request-related logs
  response: "πŸ“₯",   # For response-related logs
}.freeze
DEFAULT_EMOJI =
"❓"
EMOJIS =
STATUS.merge(ACTIONS).merge(NOTIFICATIONS).merge(RESOURCES).freeze

Class Method Summary collapse

Class Method Details

.allHash

Returns all emojis categorized by their purpose.

Returns:

  • (Hash)

    a hash containing all emojis organized by categories.



79
80
81
82
83
84
85
86
# File 'lib/dev_suite/utils/emoji.rb', line 79

def all
  {
    status: STATUS,
    actions: ACTIONS,
    notifications: NOTIFICATIONS,
    resources: RESOURCES,
  }
end

.get(key, default: DEFAULT_EMOJI) ⇒ String

Returns the emoji corresponding to the given key.

Parameters:

  • key (Symbol)

    the key to look up the emoji

  • default (String) (defaults to: DEFAULT_EMOJI)

    the default emoji if the key is not found

Returns:

  • (String)

    the corresponding emoji or the default emoji



73
74
75
# File 'lib/dev_suite/utils/emoji.rb', line 73

def get(key, default: DEFAULT_EMOJI)
  EMOJIS[key] || default
end