Sha256: a2a96aa153a943903a49886c7ecd075b41f9edde3d3887289551acd5cb5a99c3

Contents?: true

Size: 542 Bytes

Versions: 4

Compression:

Stored size: 542 Bytes

Contents

module Coltrane
  module UI
    module Views
      class ShowChord < BaseView
        questions({
          chord: { statement: 'Which chord?' },
          chord_representation: {
            statement: 'How do you wanna see it?',
            options: Commands::AvailableChordRepresentations.run
          }
        })

        def render
          chord = Commands::GetChordsFromString.run(params[:chord]).first
          Commands::GetRepresentationChords.run(params[:chord_representation], [chord])
        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_chord.rb
coltrane-4.1.1 lib/coltrane/ui/views/show_chord.rb
coltrane-4.1.0 lib/coltrane/ui/views/show_chord.rb
coltrane-4.0.6 lib/coltrane/ui/views/show_chord.rb