Module: Stannum::Messages
- Defined in:
- lib/stannum/messages.rb,
lib/stannum/messages/default_loader.rb,
lib/stannum/messages/default_strategy.rb
Overview
Namespace for generating messages for Stannum::Errors.
Defined Under Namespace
Classes: DefaultLoader, DefaultStrategy
Class Method Summary collapse
-
.locales_path ⇒ String
The absolute path to the configured locales.
-
.strategy ⇒ #call
The configured strategy for generating messages.
- .strategy=(strategy) ⇒ Object
Class Method Details
.locales_path ⇒ String
Returns the absolute path to the configured locales.
12 13 14 |
# File 'lib/stannum/messages.rb', line 12 def self.locales_path File.join(Stannum.gem_path, 'config', 'locales') end |
.strategy ⇒ #call
Returns the configured strategy for generating messages.
17 18 19 |
# File 'lib/stannum/messages.rb', line 17 def self.strategy @strategy ||= DefaultStrategy.new end |
.strategy=(strategy) ⇒ Object
22 23 24 |
# File 'lib/stannum/messages.rb', line 22 def self.strategy=(strategy) @strategy = strategy end |