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 12 13 |
# File 'app/helpers/hyrax/citations_behaviors/common_behavior.rb', line 8 def clean_end_punctuation(text) if text && ([".", ",", ":", ";", "/"].include? text[-1, 1]) return text[0, text.length - 1] end 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 |