Module: DOTIW
- Extended by:
- ActiveSupport::Autoload, DOTIW
- Included in:
- DOTIW
- Defined in:
- lib/dotiw.rb,
lib/dotiw/methods.rb,
lib/dotiw/version.rb,
lib/dotiw/time_hash.rb
Defined Under Namespace
Modules: Methods
Classes: TimeHash
Constant Summary
collapse
- DEFAULT_I18N_SCOPE =
:'datetime.dotiw'
- DEFAULT_I18N_SCOPE_COMPACT =
:'datetime.dotiw_compact'
- VERSION =
'5.3.3'
Instance Method Summary
collapse
Instance Method Details
#init_i18n! ⇒ Object
22
23
24
25
|
# File 'lib/dotiw.rb', line 22
def init_i18n!
I18n.load_path.unshift(*locale_files)
I18n.reload!
end
|
#languages ⇒ Object
27
28
29
|
# File 'lib/dotiw.rb', line 27
def languages
@languages ||= (locale_files.map { |path| path.split(%r{[/.]})[-2].to_sym })
end
|
#locale_files ⇒ Object
31
32
33
|
# File 'lib/dotiw.rb', line 31
def locale_files
files 'dotiw/locale', '*.yml'
end
|