Class: Exlibris::Primo::RelatedLink
- Inherits:
-
Object
- Object
- Exlibris::Primo::RelatedLink
- Defined in:
- lib/exlibris/primo/related_link.rb
Overview
Overview
Class for handling Primo related links from links/addlink
Class Attribute Summary collapse
-
.base_attributes ⇒ Object
readonly
Returns the value of attribute base_attributes.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ RelatedLink
constructor
A new instance of RelatedLink.
Constructor Details
#initialize(options = {}) ⇒ RelatedLink
Returns a new instance of RelatedLink.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/exlibris/primo/related_link.rb', line 8 def initialize(={}) 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) } .each { |option, value| self.instance_variable_set(('@'+option.to_s).to_sym, value) } end |
Class Attribute Details
.base_attributes ⇒ Object (readonly)
Returns the value of attribute base_attributes.
7 8 9 |
# File 'lib/exlibris/primo/related_link.rb', line 7 def base_attributes @base_attributes end |