Method: Gorynich::Fetchers::File#fetch
- Defined in:
- lib/gorynich/fetchers/file.rb
permalink #fetch ⇒ Object
[View source]
13 14 15 16 17 18 19 |
# File 'lib/gorynich/fetchers/file.rb', line 13 def fetch data = ::ERB.new(::File.read(file_path)).result ::YAML.load(data, aliases: true) || {} rescue ArgumentError ::YAML.load(data) || {} end |