Sha256: 60b7415bb9a03ae96b5334bfe8085f854e0e1e0d29a1dfedc36970addea2a3e3
Contents?: true
Size: 657 Bytes
Versions: 2
Compression:
Stored size: 657 Bytes
Contents
# frozen_string_literal: true module SongPro class Song attr_accessor :title, :artist, :capo, :key, :tempo, :year, :album, :tuning, :sections, :custom def initialize @sections = [] @custom = {} end def set_custom(key, value) @custom[key.to_sym] = value end def chords sections.collect do |section| section.lines.collect do |line| if line.measures? line.measures.collect(&:chords) else line.parts.collect(&:chord) end end end.flatten.uniq.reject(&:empty?) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
song_pro-0.1.12 | lib/song_pro/song.rb |
song_pro-0.1.11 | lib/song_pro/song.rb |