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


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

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

#persistent_url(work) ⇒ Object


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

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