Sha256: 3c58012d2406240fd9228829d5a5d1641748590197ce60a195746454940d11a9

Contents?: true

Size: 518 Bytes

Versions: 7

Compression:

Stored size: 518 Bytes

Contents

module Coltrane
  module Commands
    class GetRepresentationChords < Command
      def run(representation, chords)
        chords.map do |chord|
          if representation == 'GuitarChordChart'
            {
              chord.name => Representation::Guitar.find_chords(chord).first(4),
              options: { layout: :horizontal, per_row: 4 }
            }
          else
            { chord.name => GetRepresentationNotes.run(representation, chord.notes) }
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
coltrane-4.1.2 lib/coltrane/commands/get_representation_chords.rb
coltrane-4.1.1 lib/coltrane/commands/get_representation_chords.rb
coltrane-4.1.0 lib/coltrane/commands/get_representation_chords.rb
coltrane-4.0.6 lib/coltrane/commands/get_representation_chords.rb
coltrane-4.0.5 lib/coltrane/commands/get_representation_chords.rb
coltrane-4.0.4 lib/coltrane/commands/get_representation_chords.rb
coltrane-4.0.3 lib/coltrane/commands/get_representation_chords.rb