Module: Blacklight::Document::Sms

Defined in:
app/models/concerns/blacklight/document/sms.rb

Overview

This module provides the body of an email export based on the document's semantic values

Instance Method Summary collapse

Instance Method Details

#to_sms_textObject

Return a text string that will be the body of the email



5
6
7
8
9
10
11
# File 'app/models/concerns/blacklight/document/sms.rb', line 5

def to_sms_text
  semantics = self.to_semantic_values
  body = []
  body << I18n.t('blacklight.sms.text.title', value: semantics[:title].first) unless semantics[:title].blank?
  body << I18n.t('blacklight.sms.text.author', value: semantics[:author].first) unless semantics[:author].blank?
  return body.join unless body.empty?
end