Sha256: e0d0236d9420b2e0e704cf2fb1a134cd47274f367ebbe6a8152d9987c6ea180a

Contents?: true

Size: 747 Bytes

Versions: 3

Compression:

Stored size: 747 Bytes

Contents

module Coltrane
  module UI
    module Views
      class ShowProgression < View
        questions({
          progression: {
            statement: 'What is the progression?',
            options: Commands::AvailableNotableProgressions.run
          },

          representation: {
            statement: 'How do you wanna see the chords?',
            options: Commands::AvailableChordRepresentations.run
          },

          root: { statement: 'Start at which note? (Ex: C; D#; Fb)' }
        })

        def render
          chords = Commands::GetChordsFromNotableProgression.run(*params.values_at(:progression, :root))
          Commands::GetRepresentationChords.run(params[:representation], chords)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
coltrane-4.0.5 lib/coltrane/ui/views/show_progression.rb
coltrane-4.0.4 lib/coltrane/ui/views/show_progression.rb
coltrane-4.0.3 lib/coltrane/ui/views/show_progression.rb