Sha256: c8b072b2fae6e0e4badb2d1117811bdf7a6c40f076c8d5fb26c2906ff11a5a9e

Contents?: true

Size: 351 Bytes

Versions: 7

Compression:

Stored size: 351 Bytes

Contents

module Coltrane
  module Renderers
    module TextRenderer
      class HashDrawer < BaseDrawer
        alias hash model

        def render
          options = hash.delete(:options) || {}
          hash.map { |k, v|
            "#{k}: \n\n" +
            TextRenderer.render(v, **options)
          }.join("\n")
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
coltrane-4.1.2 lib/coltrane/renderers/text_renderer/hash_drawer.rb
coltrane-4.1.1 lib/coltrane/renderers/text_renderer/hash_drawer.rb
coltrane-4.1.0 lib/coltrane/renderers/text_renderer/hash_drawer.rb
coltrane-4.0.6 lib/coltrane/renderers/text_renderer/hash_drawer.rb
coltrane-4.0.5 lib/coltrane/renderers/text_renderer/hash_drawer.rb
coltrane-4.0.4 lib/coltrane/renderers/text_renderer/hash_drawer.rb
coltrane-4.0.3 lib/coltrane/renderers/text_renderer/hash_drawer.rb