Sha256: ca3b9c31cbeef7578ee071246bf56523a91e913acfd75084e057c7e4aedd5f24
Contents?: true
Size: 711 Bytes
Versions: 4
Compression:
Stored size: 711 Bytes
Contents
module Exlibris module Primo # == Overview # Class for handling Primo Rsrcs from links/linktorsrc class Rsrc @base_attributes = [ :record_id, :linktorsrc, :v, :url, :display, :institution_code, :origin, :notes ] class << self; attr_reader :base_attributes end def initialize(options={}) base_attributes = (self.class.base_attributes.nil?) ? Exlibris::Primo::Rsrc.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 end
Version data entries
4 entries across 4 versions & 1 rubygems