Method: Caty::HasDescription#short_description
- Defined in:
- lib/caty/has_description.rb
#short_description ⇒ Object
If a description was set for this object, this will return the first line of that desciption. Else nil will be returned.
17 18 19 20 21 22 23 |
# File 'lib/caty/has_description.rb', line 17 def short_description if self.description.nil? nil else self.description[%r{^[^\n\r]*}] end end |