lib/world_flags/languages.rb in world-flags-0.2.3 vs lib/world_flags/languages.rb in world-flags-0.2.4

- old
+ new

@@ -1,22 +1,26 @@ module WorldFlags module Languages - def self.en - { - :ar => 'Argentinian Spanish', - :br => 'Brazilian Portuguese', - :po => 'Portuguese', - :gr => 'Greek', - :gb => 'British English', - :us => 'US English', - :es => 'Spanish', - :it => 'Italian', - :nl => 'Dutch', - :de => 'German', - :dk => 'Danish', - :se => 'Swedish', - :no => 'Norwegian', - :fi => 'Finnish' - } + class << self + attr_writer :en + + def en + @en ||= { + :ar => 'Argentinian Spanish', + :br => 'Brazilian Portuguese', + :po => 'Portuguese', + :gr => 'Greek', + :gb => 'British English', + :us => 'US English', + :es => 'Spanish', + :it => 'Italian', + :nl => 'Dutch', + :de => 'German', + :dk => 'Danish', + :se => 'Swedish', + :no => 'Norwegian', + :fi => 'Finnish' + } + end end end end \ No newline at end of file