Sha256: 78cb89dacdc51c8931b9450d47c14995b0f17117bee87d3875cafa6cd5f22309
Contents?: true
Size: 568 Bytes
Versions: 13
Compression:
Stored size: 568 Bytes
Contents
module Music module Transcription # Defines a dynamic level # # @author James Tunnell # class Dynamic def ==(other) self.class == other.class end def clone self.class.new end { :Piano => "p", :Pianissimo => "pp", :Pianississimo => "ppp", :MezzoPiano => "mp", :MezzoForte => "mf", :Forte => "f", :Fortissimo => "ff", :Fortississimo => "fff" }.each do |name,print_str| klass = Class.new(Dynamic) do def to_s print_str end end Dynamic.const_set(name.to_sym, klass) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems