Class: RemoteTranslationLoader::Fetchers::FileFetcher

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

Instance Method Summary collapse

Methods inherited from BaseFetcher

#parse

Instance Method Details

#fetch(path) ⇒ Object



6
7
8
9
10
# File 'lib/remote_translation_loader/fetchers/http_fetcher.rb', line 6

def fetch(path)
  raise "File not found: #{path}" unless File.exist?(path)

  parse(File.read(path))
end