Sha256: 29309a2eff8749130f3239d59f6ceafb1be5045993cfdf674e46338a5dda4fac

Contents?: true

Size: 374 Bytes

Versions: 25

Compression:

Stored size: 374 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  module CitationsBehaviors
    module CommonBehavior
      def persistent_url(work)
        "#{Hyrax.config.persistent_hostpath}#{work.id}"
      end

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

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
hyrax-5.0.1 app/helpers/hyrax/citations_behaviors/common_behavior.rb
hyrax-5.0.0 app/helpers/hyrax/citations_behaviors/common_behavior.rb
hyrax-5.0.0.rc3 app/helpers/hyrax/citations_behaviors/common_behavior.rb
hyrax-5.0.0.rc2 app/helpers/hyrax/citations_behaviors/common_behavior.rb
hyrax-5.0.0.rc1 app/helpers/hyrax/citations_behaviors/common_behavior.rb
hyrax-3.6.0 app/helpers/hyrax/citations_behaviors/common_behavior.rb
hyrax-4.0.0 app/helpers/hyrax/citations_behaviors/common_behavior.rb
hyrax-4.0.0.rc3 app/helpers/hyrax/citations_behaviors/common_behavior.rb
hyrax-4.0.0.rc2 app/helpers/hyrax/citations_behaviors/common_behavior.rb
hyrax-4.0.0.rc1 app/helpers/hyrax/citations_behaviors/common_behavior.rb
hyrax-3.5.0 app/helpers/hyrax/citations_behaviors/common_behavior.rb
hyrax-4.0.0.beta2 app/helpers/hyrax/citations_behaviors/common_behavior.rb
hyrax-3.4.2 app/helpers/hyrax/citations_behaviors/common_behavior.rb
hyrax-4.0.0.beta1 app/helpers/hyrax/citations_behaviors/common_behavior.rb
hyrax-3.4.1 app/helpers/hyrax/citations_behaviors/common_behavior.rb
hyrax-3.4.0 app/helpers/hyrax/citations_behaviors/common_behavior.rb
hyrax-3.3.0 app/helpers/hyrax/citations_behaviors/common_behavior.rb
hyrax-3.2.0 app/helpers/hyrax/citations_behaviors/common_behavior.rb
hyrax-3.1.0 app/helpers/hyrax/citations_behaviors/common_behavior.rb
hyrax-3.0.2 app/helpers/hyrax/citations_behaviors/common_behavior.rb