Sha256: 726e590e4479dbc058350f54142e21a8f88a5576dd49fad2798ddbb66f2d007b
Contents?: true
Size: 662 Bytes
Versions: 3
Compression:
Stored size: 662 Bytes
Contents
module Coltrane module Cli class Chord def initialize(*chords, on: :text, flavor: 'intervals', notes: nil) @chords = if !chords.empty? if chords[0].is_a?(String) chords.map { |c| Coltrane::Chord.new(name: c) } else chords end elsif !notes.nil? [Coltrane::Chord.new(notes: notes)] end @chords.each do |chord| raise ChordNotFoundError unless chord.named? desc = "#{chord.name} chord:" Coltrane::Cli::Notes.new(chord.notes, on: on, desc: desc, flavor: flavor) end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
coltrane-1.0.11 | lib/cli/chord.rb |
coltrane-1.0.1 | lib/cli/chord.rb |
coltrane-1.0.0 | lib/cli/chord.rb |