Method: CueChapter::CueChapter#to_chapter_xml

Defined in:
lib/cuechapter.rb

#to_chapter_xmlObject



24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/cuechapter.rb', line 24

def to_chapter_xml
  xml = Builder::XmlMarkup.new(:indent => 2)

  xml.chapters("version" => "1") {
    songs.each do |song|
      xml.chapter("starttime" => "#{song[:index].minutes}:#{song[:index].seconds}") {
        xml.title "#{song[:performer]} - #{song[:title]}"
        xml.picture "#{@image_file}"
        xml.link "#{@link}"
      }
    end
  }
end