Sha256: 687797ba160d1e924511ed778a5d113d4f9421e548271420328cb48a3618d231

Contents?: true

Size: 379 Bytes

Versions: 11

Compression:

Stored size: 379 Bytes

Contents

module BootstrapEmail
  module Converter
    class Color < Base
      def build
        each_node('*[class*=bg-]') do |node|
          next unless ['div'].include?(node.name) # only do automatic thing for div

          node.replace(template('table', classes: "#{node['class']} w-full", contents: node.delete('class') && node.inner_html))
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
bootstrap-email-1.1.4 lib/bootstrap-email/converters/color.rb
bootstrap-email-1.1.3 lib/bootstrap-email/converters/color.rb
bootstrap-email-1.1.2 lib/bootstrap-email/converters/color.rb
bootstrap-email-1.1.1 lib/bootstrap-email/converters/color.rb
bootstrap-email-1.1.0 lib/bootstrap-email/converters/color.rb
bootstrap-email-1.0.2 lib/bootstrap-email/converters/color.rb
bootstrap-email-1.0.1 lib/bootstrap-email/converters/color.rb
bootstrap-email-1.0.0 lib/bootstrap-email/converters/color.rb
bootstrap-email-1.0.0.alpha4 lib/bootstrap-email/converters/color.rb
bootstrap-email-1.0.0.alpha3.1 lib/bootstrap-email/converters/color.rb
bootstrap-email-1.0.0.alpha3 lib/bootstrap-email/converters/color.rb