Module: Datify::Language

Included in:
Engine
Defined in:
lib/datify/language.rb

Constant Summary collapse

MONTHS_IT =
{ 'GEN' => 1, 'FEB' => 2, 'MAR' => 3, 'APR' => 4, 'MAG' => 5, 'GIU' => 6, 'LUG' => 7, 'AGO' => 8, 'SET' => 9, 'OTT' => 10, 'NOV' => 11, 'DIC' => 12, }

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#langObject (readonly)

Returns the value of attribute lang.



3
4
5
# File 'lib/datify/language.rb', line 3

def lang
  @lang
end

Instance Method Details

#default_languageObject



7
8
9
# File 'lib/datify/language.rb', line 7

def default_language
  @lang = 'it'
end

#get_month(m) ⇒ Object



15
16
17
# File 'lib/datify/language.rb', line 15

def get_month(m)
  MONTHS_IT[m.upcase] || m
end

#set_language(locale) ⇒ Object



11
12
13
# File 'lib/datify/language.rb', line 11

def set_language(locale)
  @lang = locale
end