Class: Mayl::Env
- Inherits:
-
Object
- Object
- Mayl::Env
- Defined in:
- lib/mayl/env.rb
Overview
Public: Represents the global state with the loaded locales, and has the ability to save locales to disk.
Instance Attribute Summary collapse
-
#last_value ⇒ Object
Returns the value of attribute last_value.
-
#locales ⇒ Object
readonly
Returns the value of attribute locales.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
Instance Method Summary collapse
-
#commit ⇒ Object
Public: Saves any changes to disk.
-
#initialize(path) ⇒ Env
constructor
Public: Initializes a new Env loading the locales from a path.
Constructor Details
Instance Attribute Details
#last_value ⇒ Object
Returns the value of attribute last_value.
6 7 8 |
# File 'lib/mayl/env.rb', line 6 def last_value @last_value end |
#locales ⇒ Object (readonly)
Returns the value of attribute locales.
5 6 7 |
# File 'lib/mayl/env.rb', line 5 def locales @locales end |
#namespace ⇒ Object
Returns the value of attribute namespace.
7 8 9 |
# File 'lib/mayl/env.rb', line 7 def namespace @namespace end |
Instance Method Details
#commit ⇒ Object
Public: Saves any changes to disk.
17 18 19 |
# File 'lib/mayl/env.rb', line 17 def commit @locales.each(&:commit) end |