Sha256: 3dcca46c689ff326a8da0ca63f0a90b8f0920e444de8149ad7ac1a7783ea3983

Contents?: true

Size: 218 Bytes

Versions: 7

Compression:

Stored size: 218 Bytes

Contents

module Coltrane
  module Commands
    class GetChordsFromString < Command
      def run(string)
        string.split(' ').map do |chord|
          Theory::Chord.new(name: chord)
        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_chords_from_string.rb
coltrane-4.1.1 lib/coltrane/commands/get_chords_from_string.rb
coltrane-4.1.0 lib/coltrane/commands/get_chords_from_string.rb
coltrane-4.0.6 lib/coltrane/commands/get_chords_from_string.rb
coltrane-4.0.5 lib/coltrane/commands/get_chords_from_string.rb
coltrane-4.0.4 lib/coltrane/commands/get_chords_from_string.rb
coltrane-4.0.3 lib/coltrane/commands/get_chords_from_string.rb