class Authpds::Exlibris::Pds::BorInfo
Makes a call get-attribute with attribute “bor_info”. Raises an exception if there is an unexpected response.
Public Class Methods
new(pds_url, calling_system, pds_handle)
click to toggle source
Calls superclass method
Authpds::Exlibris::Pds::GetAttribute::new
# File lib/authpds/exlibris/pds.rb, line 45 def initialize(pds_url, calling_system, pds_handle) super(pds_url, calling_system, pds_handle, "bor_info") raise RuntimeError.new( "Error in #{self.class}."+ "Unrecognized response: #{@response}.") unless @response.root.name.eql?("bor-info") or @response.root.name.eql?("pds") return unless @response.root.name.eql?("bor-info") bor_info = @response.root.children.each { |xml_element| pds_attr = xml_element.name.gsub("-", "_") self.class.send(:attr_reader, pds_attr) instance_variable_set("@#{pds_attr}".to_sym, xml_element.inner_text) unless xml_element.inner_text.nil? } end