Sha256: 89df043133b0adc5b250bc0a020324059a44c2cc9d1a5ef899ae0eb842750391

Contents?: true

Size: 387 Bytes

Versions: 2

Compression:

Stored size: 387 Bytes

Contents

module BootstrapEmail
  module Component
    class Block < Base
      def build
        each_node('block, .to-table') do |node|
          # add .to-table if it's not already there
          class_name = node['class'].to_s.split << 'to-table'
          node.replace(template('table', classes: class_name.uniq.join(' '), contents: node.inner_html))
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bootstrap-email-1.0.0.alpha2.1 lib/bootstrap-email/components/block.rb
bootstrap-email-1.0.0.alpha2 lib/bootstrap-email/components/block.rb