class Coltrane::Renderers::TextRenderer::TheoryProgressionSetDrawer

Public Instance Methods

notation_width() click to toggle source
# File lib/coltrane/renderers/text_renderer/theory_progression_set_drawer.rb, line 15
def notation_width
  @notation_width ||=
    progression_set.map(&:notation).map(&:size).max
end
render() click to toggle source
# File lib/coltrane/renderers/text_renderer/theory_progression_set_drawer.rb, line 7
def render
  progression_set.map do |progression|
    "#{progression.notation.ljust(notation_width + 1, ' ')} in " \
    "#{progression.scale} (#{progression.notes_out.size} notes out)"
  end
  .join("\n")
end