Class: AmaLayout::NotificationScrubber
- Inherits:
-
Rails::Html::PermitScrubber
- Object
- Rails::Html::PermitScrubber
- AmaLayout::NotificationScrubber
- Defined in:
- lib/ama_layout/notification_scrubber.rb
Instance Method Summary collapse
-
#initialize ⇒ NotificationScrubber
constructor
A new instance of NotificationScrubber.
- #skip_node?(node) ⇒ Boolean
Constructor Details
#initialize ⇒ NotificationScrubber
Returns a new instance of NotificationScrubber.
3 4 5 6 7 |
# File 'lib/ama_layout/notification_scrubber.rb', line 3 def initialize super self. = %w(i a div span strong br em h1 h2 h3 h4 h5 h6 blockquote) self.attributes = %w(href class id) end |
Instance Method Details
#skip_node?(node) ⇒ Boolean
9 10 11 |
# File 'lib/ama_layout/notification_scrubber.rb', line 9 def skip_node?(node) node.text? end |