pedrozath/coltrane

View on GitHub
lib/coltrane/commands/get_chords_from_string.rb

Summary

Maintainability
A
0 mins
Test Coverage
D
66%
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