Class: UiBibz::Utils::Internationalization

Inherits:
Object
  • Object
show all
Defined in:
lib/ui_bibz/utils/internationalization.rb

Instance Method Summary (collapse)

Constructor Details

- (Internationalization) initialize(translation, options = {})

Returns a new instance of Internationalization



4
5
6
7
# File 'lib/ui_bibz/utils/internationalization.rb', line 4

def initialize translation, options = {}
  @translation = translation
  @options     = options
end

Instance Method Details

- (Object) translate



9
10
11
# File 'lib/ui_bibz/utils/internationalization.rb', line 9

def translate
  I18n.t(@translation, options_with_default)
end