Tools

A library of utility services and concerns.

Class: SleepingKingStudios::Tools::Messages

Parent Namespace
SleepingKingStudios::Tools
Inherited Classes
SleepingKingStudios::Tools::Base > Object
Defined In
lib/sleeping_king_studios/tools/messages.rb

Table Of Contents

Overview

Utility for generating configured, user-readable output strings.

Back To Top

Defined Under Namespace

Classes
Registry, Strategy
Modules
Strategies

Back To Top

Class Methods

.instance => SleepingKingStudios::Tools::Base

Inherited From
SleepingKingStudios::Tools::Base

Returns

Back To Top

Constructor

#initialize(registry:, toolbelt: nil) => Messages

Parameters

Returns

Back To Top

Instance Attributes

#registry => SleepingKingStudios::Tools::Messages::Registry (readonly)

Returns

Back To Top

Instance Methods

#message(key, parameters: {}, scope: nil, **options) => Object

Generates a message from the given key, scope, and parameters.

Internally, finds a messages strategy matching the combined key and scope and calls that strategy. If a strategy is not found, instead returns a generic failure message.

Parameters

#toolbelt => SleepingKingStudios::Tools::Toolbelt

Also known as: tools

Inherited From
SleepingKingStudios::Tools::Base

Returns

Back To Top


Back to Documentation | Reference | SleepingKingStudios | SleepingKingStudios::Tools