Class: TranslationCms::Utils::RemoteFile
- Inherits:
-
Object
- Object
- TranslationCms::Utils::RemoteFile
- Defined in:
- lib/translation_cms/utils.rb
Instance Method Summary collapse
- #fetch ⇒ Object
-
#initialize(url) ⇒ RemoteFile
constructor
A new instance of RemoteFile.
Constructor Details
#initialize(url) ⇒ RemoteFile
Returns a new instance of RemoteFile.
10 11 12 |
# File 'lib/translation_cms/utils.rb', line 10 def initialize(url) @full_url = url end |
Instance Method Details
#fetch ⇒ Object
14 15 16 17 18 19 |
# File 'lib/translation_cms/utils.rb', line 14 def fetch open(@full_url, allow_redirections: :safe) rescue Exception => e Rails.logger.error(e.) nil end |