Sha256: 5b1eae88f9f38d6c5c6dd68a825bd408f23b185b8b57bae70aaa34f53d636078

Contents?: true

Size: 805 Bytes

Versions: 9

Compression:

Stored size: 805 Bytes

Contents

module Exlibris
  module Primo
    #
    # Abstract class representing a link in Primo.
    #
    class Link
      include Abstract
      include Config::Attributes
      include WriteAttributes

      self.abstract = true

      attr_accessor :institution, :record_id, :original_id,
        :url, :display, :notes, :subfields, :display_code

      def initialize *args
        # URLs may have XML escaped ampersands
        # so we need to account for that.
        args.last[:url].gsub!("&", "&") unless args.last.nil?
        super(*args)
      end
    end

    #
    # Primo fulltext link.
    #
    class Fulltext < Link; end

    #
    # Primo table of contents link.
    #
    class TableOfContents < Link; end

    #
    # Primo related link.
    #
    class RelatedLink < Link; end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
exlibris-primo-2.1.1 lib/exlibris/primo/link.rb
exlibris-primo-2.1.0 lib/exlibris/primo/link.rb
exlibris-primo-2.0.0 lib/exlibris/primo/link.rb
exlibris-primo-1.1.9 lib/exlibris/primo/link.rb
exlibris-primo-1.1.8 lib/exlibris/primo/link.rb
exlibris-primo-1.1.7 lib/exlibris/primo/link.rb
exlibris-primo-1.1.6 lib/exlibris/primo/link.rb
exlibris-primo-1.1.5 lib/exlibris/primo/link.rb
exlibris-primo-1.1.4 lib/exlibris/primo/link.rb