Method: Faun::SectionWithMeta#initialize
- Defined in:
- lib/faun.rb
#initialize(id, name, path, type) ⇒ SectionWithMeta
Returns a new instance of SectionWithMeta.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/faun.rb', line 54 def initialize(id, name, path, type) super(id, name, path, type) Async do begin File.open(File.join(path, "meta.yaml"), "r:UTF-8") do |file| generic = Async::IO::Stream.new(file) @meta = YAML.load(generic.read) end rescue @meta = {} end end.wait end |