Module: Reacco::Filters::Brief

Included in:
Readme
Defined in:
lib/reacco/filters/brief.rb

Instance Method Summary collapse

Instance Method Details

#brief_first_p(html) ⇒ Object

Makes the first <p> a brief.



5
6
7
8
9
# File 'lib/reacco/filters/brief.rb', line 5

def brief_first_p(html)
  p = html.at_css('body>p')
  p['class'] = "#{p['class']} brief"  if p
  html
end