Module: Rosette::Core::Commands::WithLocale
- Included in:
- ExportCommand, TranslationLookupCommand
- Defined in:
- lib/rosette/core/commands/translations/with_locale.rb
Overview
Mixin that handles configuration and validation of a locale code. Meant to be mixed into the classes in Rosette::Core::Commands.
Instance Attribute Summary collapse
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
Instance Method Summary collapse
-
#set_locale(locale_code) ⇒ self
Sets the locale code.
Instance Attribute Details
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
27 28 29 |
# File 'lib/rosette/core/commands/translations/with_locale.rb', line 27 def locale @locale end |
Instance Method Details
#set_locale(locale_code) ⇒ self
Sets the locale code.
33 34 35 36 |
# File 'lib/rosette/core/commands/translations/with_locale.rb', line 33 def set_locale(locale_code) @locale = locale_code self end |