Sha256: 250f3b023069374a129ee7c8c47ce15e99397c059a7db7338b68e4d6813cd67d

Contents?: true

Size: 674 Bytes

Versions: 4

Compression:

Stored size: 674 Bytes

Contents

module Coltrane
  module UI
    module Views
      class ShowScale < BaseView
        questions({
          scale: {
            statement: 'Which Scale?',
            options: Commands::AvailableClassicScales.run
          },

          tone: { statement: 'What is the root of the scale?' },

          representation: {
            statement: 'How to display?',
            options: Commands::AvailableRepresentations.run
          }
        })

        def render
          scale = Commands::GetClassicScale.run(*params.values_at(:scale, :tone))
          Commands::GetRepresentationNotes.run(params[:representation], scale.notes)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
coltrane-4.1.2 lib/coltrane/ui/views/show_scale.rb
coltrane-4.1.1 lib/coltrane/ui/views/show_scale.rb
coltrane-4.1.0 lib/coltrane/ui/views/show_scale.rb
coltrane-4.0.6 lib/coltrane/ui/views/show_scale.rb