Class: BootstrapEmail::Converter::Block
- Defined in:
- lib/bootstrap-email/converters/block.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from BootstrapEmail::Converter::Base
Instance Method Details
#build ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/bootstrap-email/converters/block.rb', line 4 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 |