module MusicXML::Node
Namespace for all nodes defined by the system. Nodes are used to represent the various segments of the XML describing different musical concepts.
Attributes
registry[RW]
Public Class Methods
register(name, &block)
click to toggle source
# File lib/musicxml/node.rb, line 12 def self.register(name, &block) class_name = name.to_s.capitalize.gsub(/\_([a-z])/) { $1.to_s.upcase } clazz = Class.new(Base, &block) registry[name] = clazz const_set(class_name.to_sym, clazz) end
Public Instance Methods
humanize()
click to toggle source
# File lib/musicxml/node.rb, line 66 def humanize (@key_signature ||= KeySignature.new(fifths.to_i)).humanize end