Module: Hyrax::CitationsBehaviors::CommonBehavior

Included in:
Hyrax::CitationsBehavior, Formatters::BaseFormatter, NameBehavior, PublicationBehavior, TitleBehavior
Defined in:
app/helpers/hyrax/citations_behaviors/common_behavior.rb

Instance Method Summary collapse

Instance Method Details

#clean_end_punctuation(text) ⇒ Object



9
10
11
12
# File 'app/helpers/hyrax/citations_behaviors/common_behavior.rb', line 9

def clean_end_punctuation(text)
  return text[0, text.length - 1] if text && ([".", ",", ":", ";", "/"].include? text[-1, 1])
  text
end

#persistent_url(work) ⇒ Object



5
6
7
# File 'app/helpers/hyrax/citations_behaviors/common_behavior.rb', line 5

def persistent_url(work)
  "#{Hyrax.config.persistent_hostpath}#{work.id}"
end