Class: ActiveMail::Components::Button
- Extended by:
- T::Sig
- Defined in:
- lib/activemail/components/button.rb
Constant Summary
Constants inherited from Base
ActiveMail::Components::Base::IGNORED_ON_PASSTHROUGH, ActiveMail::Components::Base::TABLE_RESET
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from ActiveMail::Components::Base
Instance Method Details
#transform(node, inner) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/activemail/components/button.rb', line 12 def transform(node, inner) = class?(node, 'expand') inner = anchor(node, inner, ) if node.attr('href') inner = "<center>#{inner}</center>" if classes = combine_classes(node, 'button') = ? '<td class="expander"></td>' : '' [ %(<table class="#{classes}" #{TABLE_RESET}><tbody><tr><td>), %(<table #{TABLE_RESET}><tbody><tr><td>#{inner}</td></tr></tbody></table>), %(</td>#{}</tr></tbody></table>) ].join end |