Sha256: 7d9b5b681cab11f5d841c84900f7f6711e26b30f9e40e8f3c92b9db4e3fc07aa

Contents?: true

Size: 368 Bytes

Versions: 2

Compression:

Stored size: 368 Bytes

Contents

# frozen_string_literal: true

module AsyncPartial
  class HamlArrayBuffer < Array
    def html_safe
      map {|v| AsyncPartial::AsyncResult === v ? v.value : v}.join.html_safe
    end
  end

  module HamlArrayBufferizer
    def initialize(*)
      super
      @buffer = AsyncPartial::HamlArrayBuffer.new
    end
  end

  Haml::Buffer.prepend HamlArrayBufferizer
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
async_partial-0.6.0 lib/async_partial/handlers/haml.rb
async_partial-0.4.0 lib/async_partial/handlers/haml.rb