Module: JazzModel::NoteSequence

Defined in:
lib/jazz_model/note_sequence.rb

Overview

Mixins for a sequence of note represented as an array.

Instance Method Summary collapse

Instance Method Details

#to_xml(options = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/jazz_model/note_sequence.rb', line 4

def to_xml(options = {})
	options[:indent] ||= 2
	xml = options[:builder] ||= Builder::XmlMarkup.new(:indent => options[:indent])
	xml.instruct! unless options[:skip_instruct]
	xml.notes do
		self.each do |note|
			xml.tag!(:note, note.to_s)
		end
	end
end