Class: Coltrane::UI::Views::FindCommonChordsInScales
- Defined in:
- lib/coltrane/ui/views/find_common_chords_in_scales.rb
Instance Attribute Summary
Attributes inherited from View
Instance Method Summary collapse
Methods inherited from View
#ensure_param, #go_to, inherited, #initialize, #output, questions, render, set_path
Constructor Details
This class inherits a constructor from Coltrane::UI::Views::View
Instance Method Details
#render ⇒ Object
30 31 32 33 34 35 36 |
# 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 |