Sha256: 45f03a3d6175b83f8ca89ca2a4275af7bd579539de438e07c06d0db013155317

Contents?: true

Size: 649 Bytes

Versions: 17

Compression:

Stored size: 649 Bytes

Contents

module Exlibris::Primo
  # 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

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
umlaut-3.0.0beta2 lib/exlibris/primo/rsrc.rb
umlaut-3.0.0beta1 lib/exlibris/primo/rsrc.rb
umlaut-3.0.0alpha15 lib/exlibris/primo/rsrc.rb
umlaut-3.0.0alpha14 lib/exlibris/primo/rsrc.rb
umlaut-3.0.0alpha13 lib/exlibris/primo/rsrc.rb
umlaut-3.0.0alpha12 lib/exlibris/primo/rsrc.rb
umlaut-3.0.0alpha11 lib/exlibris/primo/rsrc.rb
umlaut-3.0.0alpha10 lib/exlibris/primo/rsrc.rb
umlaut-3.0.0alpha9 lib/exlibris/primo/rsrc.rb
umlaut-3.0.0alpha8 lib/exlibris/primo/rsrc.rb
umlaut-3.0.0alpha7 lib/exlibris/primo/rsrc.rb
umlaut-3.0.0alpha6 lib/exlibris/primo/rsrc.rb
umlaut-3.0.0alpha5 lib/exlibris/primo/rsrc.rb
umlaut-3.0.0alpha4 lib/exlibris/primo/rsrc.rb
umlaut-3.0.0alpha3 lib/exlibris/primo/rsrc.rb
umlaut-3.0.0alpha2 lib/exlibris/primo/rsrc.rb
umlaut-3.0.0alpha1 lib/exlibris/primo/rsrc.rb