Sha256: d5d04e72d1af44dec2fbad6c660fa1b1381b6aa1fcd87f0215a7f296bcbaea75
Contents?: true
Size: 440 Bytes
Versions: 6
Compression:
Stored size: 440 Bytes
Contents
require 'fretboards/renderer/base' module Fretboards module Renderer class Text < Base def render(fb) @fb = fb output_marks = [] @fb.string_count.downto(1).each do |n| mark = fb.marks.find { |m| m[:string] == n && m[:symbol] != :phantom } output_marks << (!mark.nil? ? mark[:fret] : "x" ) end output = output_marks.join(" ") end end end end
Version data entries
6 entries across 6 versions & 1 rubygems