lib/liquid_diagrams/renderers/bitfield_renderer.rb in liquid-diagrams-0.3.0 vs lib/liquid_diagrams/renderers/bitfield_renderer.rb in liquid-diagrams-0.4.0

- old
+ new

@@ -1,33 +1,29 @@ # frozen_string_literal: true module LiquidDiagrams module Renderers class BitfieldRenderer < BasicRenderer + FLAGS = %w[ + compact + hflip + vflip + ].freeze + OPTIONS = %w[ - vspace - hspace - lanes bits + lanes + hspace + vspace fontsize fontfamily fontweight ].freeze def render Rendering.render_with_tempfile(build_command, @content) do |input, output| "--input #{input} > #{output}" end - end - - def build_command - command = +'bitfield' - - @config.slice(*OPTIONS).each do |opt, value| - command << " --#{opt} #{value}" - end - - command end end end end