Class: RemoteTranslationLoader::Fetchers::BaseFetcher
- Inherits:
-
Object
- Object
- RemoteTranslationLoader::Fetchers::BaseFetcher
show all
- Defined in:
- lib/remote_translation_loader/fetchers/base_fetcher.rb
Instance Method Summary
collapse
Instance Method Details
#fetch(_source) ⇒ Object
6
7
8
|
# File 'lib/remote_translation_loader/fetchers/base_fetcher.rb', line 6
def fetch(_source)
raise NotImplementedError, "Subclasses must implement the `fetch` method"
end
|
#parse(content) ⇒ Object
10
11
12
13
14
|
# File 'lib/remote_translation_loader/fetchers/base_fetcher.rb', line 10
def parse(content)
YAML.safe_load(content)
rescue Psych::SyntaxError => e
raise "Failed to parse content: #{e.message}"
end
|