Class: Musicality::Tasks::FileRaker::YAML

Inherits:
Musicality::Tasks::FileRaker show all
Defined in:
lib/musicality/project/file_raker.rb

Instance Attribute Summary

Attributes inherited from Musicality::Tasks::FileRaker

#file_ext, #files, #subdirs, #task_name

Instance Method Summary collapse

Constructor Details

#initialize(score_files) ⇒ YAML

Returns a new instance of YAML.



34
35
36
37
38
39
40
# File 'lib/musicality/project/file_raker.rb', line 34

def initialize score_files
  super(score_files, :yaml, ".yml") do |t|
    puts "#{t.source} -> #{t.name}"
    yml = ScoreDSL.load(t.source).score.pack.to_yaml
    File.write(t.name, yml)
  end
end