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, #task_name

Instance Method Summary collapse

Constructor Details

#initialize(score_files) ⇒ YAML

Returns a new instance of YAML.



26
27
28
29
30
31
32
# File 'lib/musicality/project/file_raker.rb', line 26

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