Method: Cloudlib::Entry#show_attribute
- Defined in:
- lib/cloudlib.rb
#show_attribute(attribute) ⇒ Object
Returns a string representation of an attribute.
330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/cloudlib.rb', line 330 def show_attribute(attribute) value = self.attributes[attribute] if value.nil? "" elsif attribute == 'keywords' value.join(' ') elsif attribute == 'editors' || attribute == 'authors' value.join(' and ') else value[0] end end |