Sha256: 01e6140adc8f2e6bee2900a921d865b5b11970ec8ef2aa7f0d1a4ca024ee39f2

Contents?: true

Size: 406 Bytes

Versions: 22

Compression:

Stored size: 406 Bytes

Contents

module Coltrane
  module Renderers
    module TextRenderer
      class TheoryNoteSetDrawer < BaseDrawer
        def render
          case flavor
          when :marks, :notes, :degrees
            model.pretty_names.join(' ')
          when :intervals
            model.map { |n| (model.first - n).name }.join(' ')
          else raise WrongFlavorError
          end
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
coltrane-4.1.2 lib/coltrane/renderers/text_renderer/theory_note_set_drawer.rb
coltrane-4.1.1 lib/coltrane/renderers/text_renderer/theory_note_set_drawer.rb
coltrane-4.1.0 lib/coltrane/renderers/text_renderer/theory_note_set_drawer.rb
coltrane-4.0.6 lib/coltrane/renderers/text_renderer/theory_note_set_drawer.rb
coltrane-4.0.5 lib/coltrane/renderers/text_renderer/theory_note_set_drawer.rb
coltrane-4.0.4 lib/coltrane/renderers/text_renderer/theory_note_set_drawer.rb
coltrane-4.0.3 lib/coltrane/renderers/text_renderer/theory_note_set_drawer.rb
coltrane-3.4.2 lib/coltrane/renderers/text_renderer/theory_note_set_drawer.rb
coltrane-3.4.1 lib/coltrane/renderers/text_renderer/theory_note_set_drawer.rb
coltrane-3.4.0 lib/coltrane/renderers/text_renderer/theory_note_set_drawer.rb
coltrane-3.3.3 lib/coltrane/renderers/text_renderer/theory_note_set_drawer.rb
coltrane-3.3.2 lib/coltrane/renderers/text_renderer/theory_note_set_drawer.rb
coltrane-3.3.1 lib/coltrane/renderers/text_renderer/theory_note_set_drawer.rb
coltrane-3.3.0 lib/coltrane/renderers/text_renderer/theory_note_set_drawer.rb
coltrane-3.2.0 lib/coltrane/renderers/text_renderer/theory_note_set_drawer.rb
coltrane-3.1.3 lib/coltrane/renderers/text_renderer/theory_note_set_drawer.rb
coltrane-3.1.2 lib/coltrane/renderers/text_renderer/theory_note_set_drawer.rb
coltrane-3.1.1 lib/coltrane/renderers/text_renderer/theory_note_set_drawer.rb
coltrane-3.1.0 lib/coltrane/renderers/text_renderer/theory_note_set_drawer.rb
coltrane-3.0.0 lib/coltrane/renderers/text_renderer/theory_note_set_drawer.rb