Sha256: f48976825bcb02e059410c97b26d56347aca7d9e2638cb9f497cb1afac3dae9a
Contents?: true
Size: 634 Bytes
Versions: 8
Compression:
Stored size: 634 Bytes
Contents
module Exlibris::Primo # Class for handling Primo related links from links/addlink class RelatedLink @base_attributes = [ :record_id, :addlink, :url, :display, :notes ] class << self; attr_reader :base_attributes end def initialize(options={}) base_attributes = (self.class.base_attributes.nil?) ? Exlibris::Primo::RelatedLink.base_attributes : self.class.base_attributes base_attributes.each { |attribute| self.class.send(:attr_reader, attribute) } options.each { |option, value| self.instance_variable_set(('@'+option.to_s).to_sym, value) } end end end
Version data entries
8 entries across 8 versions & 1 rubygems