Method: Uke#print_chords

Defined in:
lib/uke.rb


12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/uke.rb', line 12

def print_chords(which, style = nil)
  Array(which).each{ |chord_name|
    chords = CHORDS[chord_name]
    if !chords.empty?
      puts chords.reduce(
        chord_name_to_ascii_lines(chord_name)
      ){ |old_lines, chord|
        old_lines.zip(Fretboard.new(chord, style).lines).map(&:join)
      }.join($/)
    else
      $stderr.puts "\n   #{chord_name} not found"
    end
  }
end