Class: Exlibris::Primo::Rsrc

Inherits:
Object
  • Object
show all
Defined in:
lib/exlibris/primo/rsrc.rb

Overview

Overview

Class for handling Primo Rsrcs from links/linktorsrc

Class Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Rsrc

Returns a new instance of Rsrc.



8
9
10
11
12
13
14
15
16
17
# File 'lib/exlibris/primo/rsrc.rb', line 8

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

Class Attribute Details

.base_attributesObject (readonly)

Returns the value of attribute base_attributes.



7
8
9
# File 'lib/exlibris/primo/rsrc.rb', line 7

def base_attributes
  @base_attributes
end