Class: Mack::ViewHelpers::L10NHelpers::Context

Inherits:
Object
  • Object
show all
Includes:
Mack::ViewHelpers::L10NHelpers
Defined in:
lib/mack-localization/helpers/view_helpers/l10n_helpers.rb

Instance Method Summary collapse

Methods included from Mack::ViewHelpers::L10NHelpers

#l10n_context, #l10n_currency, #l10n_date, #l10n_getimg, #l10n_gets, #l10n_number

Constructor Details

#initialize(view_sym, lang) ⇒ Context

Returns a new instance of Context.



8
9
10
11
# File 'lib/mack-localization/helpers/view_helpers/l10n_helpers.rb', line 8

def initialize(view_sym, lang)
  @view_sym = view_sym
  @lang     = lang
end

Instance Method Details

#currency(amount) ⇒ Object



29
30
31
# File 'lib/mack-localization/helpers/view_helpers/l10n_helpers.rb', line 29

def currency(amount)
  l10n_currency(amount, @lang)
end

#date(time, type) ⇒ Object



21
22
23
# File 'lib/mack-localization/helpers/view_helpers/l10n_helpers.rb', line 21

def date(time, type)
  l10n_date(time, type, @lang)
end

#getimg(key) ⇒ Object



17
18
19
# File 'lib/mack-localization/helpers/view_helpers/l10n_helpers.rb', line 17

def getimg(key)
  l10n_getimg(key, @view_sym, @lang)
end

#gets(key) ⇒ Object



13
14
15
# File 'lib/mack-localization/helpers/view_helpers/l10n_helpers.rb', line 13

def gets(key)
  l10n_gets(key, @view_sym, @lang)
end

#number(num) ⇒ Object



25
26
27
# File 'lib/mack-localization/helpers/view_helpers/l10n_helpers.rb', line 25

def number(num)
  l10n_number(num, @lang)
end