Class: BlockDecorator
- Inherits:
-
Draper::Decorator
- Object
- Draper::Decorator
- BlockDecorator
- Defined in:
- app/decorators/block_decorator.rb
Instance Method Summary collapse
Instance Method Details
#css_class ⇒ Object
4 5 6 7 8 |
# File 'app/decorators/block_decorator.rb', line 4 def css_class array = [object.css_class] array << 'block--centered-reverse' if right? array.join(' ') end |
#process_markdown(string) ⇒ Object
10 11 12 |
# File 'app/decorators/block_decorator.rb', line 10 def process_markdown(string) h.sanitize(Markdown.new(string).to_html, tags: %w(strong em)) end |