Class: RemoteTranslationLoader::Loader

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

Instance Method Summary collapse

Constructor Details

#initialize(urls) ⇒ Loader

Returns a new instance of Loader.



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

def initialize(urls)
  @urls = urls
end

Instance Method Details

#fetch_and_loadObject



15
16
17
18
19
20
# File 'lib/remote_translation_loader.rb', line 15

def fetch_and_load
  @urls.each do |url|
    yml_content = fetch_yaml(url)
    merge_into_i18n(yml_content)
  end
end