Class: Coltrane::Commands::GetChordsFromString
- Defined in:
- lib/coltrane/commands/get_chords_from_string.rb
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
Methods inherited from Command
Instance Method Details
#run(string) ⇒ Object
4 5 6 7 8 |
# File 'lib/coltrane/commands/get_chords_from_string.rb', line 4 def run(string) string.split(' ').map do |chord| Theory::Chord.new(name: chord) end end |