Class: Numeric

Inherits:
Object
  • Object
show all
Defined in:
lib/merb_global/base.rb

Instance Method Summary collapse

Instance Method Details

#localize(args = {}) ⇒ Object

call-seq:

localize => localized number

Format the string using the current locale

Parameters

opts<Hash>

Options of translations

Options (opts)

locale<Locale>

The translation in other locale



40
41
42
43
44
# File 'lib/merb_global/base.rb', line 40

def localize(args = {})
  opts = {:locale => Merb::Global::Locale.current}
  opts.merge!(args)
  Merb::Global::NumericProviders.provider.localize opts[:locale], self
end