Module: LocalizationBuffer
- Defined in:
- lib/amelia/active_support/core_ext/localization_buffer.rb
Instance Method Summary collapse
- #format(arg) ⇒ Object
- #internationalization(virtual_path = nil) ⇒ Object (also: #i18n)
- #internationalization_options(options = {}) ⇒ Object (also: #io)
- #translate_false ⇒ Object
- #translate_flag? ⇒ Boolean
Instance Method Details
#format(arg) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/amelia/active_support/core_ext/localization_buffer.rb', line 19 def format arg if @options.blank? @options = {format: arg} else @options[:format] = arg end self end |
#internationalization(virtual_path = nil) ⇒ Object Also known as: i18n
2 3 4 |
# File 'lib/amelia/active_support/core_ext/localization_buffer.rb', line 2 def internationalization virtual_path = nil I18n.l self, (@options ||= {}) end |
#internationalization_options(options = {}) ⇒ Object Also known as: io
12 13 14 15 |
# File 'lib/amelia/active_support/core_ext/localization_buffer.rb', line 12 def = {} @options = self end |
#translate_false ⇒ Object
28 29 30 31 |
# File 'lib/amelia/active_support/core_ext/localization_buffer.rb', line 28 def translate_false @translate_flag = false self end |
#translate_flag? ⇒ Boolean
6 7 8 |
# File 'lib/amelia/active_support/core_ext/localization_buffer.rb', line 6 def translate_flag? !defined?(@translate_flag) || @translate_flag end |