class Coltrane::UI::Views::FindCommonChordsInScales

Public Instance Methods

render() click to toggle source
# File lib/coltrane/ui/views/find_common_chords_in_scales.rb, line 30
def render
  scale_a    = Commands::GetClassicScale.run(*params.values_at(:first_scale, :first_scale_root))
  scale_b    = Commands::GetClassicScale.run(*params.values_at(:second_scale, :second_scale_root))
  chords     = Commands::FindCommonChords.run(scale_a, scale_b)
  rep_chords = Commands::GetRepresentationChords.run(params[:representation], chords)
  { "Chords that exist in #{scale_a.full_name} and #{scale_b.full_name}" => rep_chords }
end