Sha256: ae08e42297d20d54212904fc53e2bb8a3917e9ec7994680a43f0ea0f8e6e7dc8

Contents?: true

Size: 340 Bytes

Versions: 1

Compression:

Stored size: 340 Bytes

Contents

module Rack
  class Component
    # These are a few refinements to the core classes to make rendering easier
    module Refinements
      refine Array do
        # Join arrays with line breaks, so that calling list.map(&:render)
        # results in usable HTML
        def to_s
          join("\n")
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rack-component-0.3.0 lib/rack/component/refinements.rb