Sha256: 86b1eb334ba4eec95c7407978a54d99e4673aced05d2e2894c6d9d24a5dcb4cc

Contents?: true

Size: 988 Bytes

Versions: 25

Compression:

Stored size: 988 Bytes

Contents

module Exlibris
  module Primo
    #
    # Primo Review
    #
    class Review
      include Config::Attributes
      include Namespaces
      include WriteAttributes
      include XmlUtil

      def initialize *args
        @raw_xml = args.last.delete(:raw_xml)
        super
      end

      def user_id
        @user_id = xml.root.at_xpath("//userId").inner_text
      end

      def record_id
        @record_id = xml.root.at_xpath("//docId").inner_text
      end

      def rating
        @rating = xml.root.at_xpath("//rating").inner_text
      end

      def status
        @status = xml.root.at_xpath("//status").inner_text
      end

      def value
        @value = xml.root.at_xpath("//value").inner_text
      end

      def user_display_name
        @user_display_name = xml.root.at_xpath("//userDisplayName").inner_text
      end

      def allow_user_name?
        @allow_user_name = (xml.root.at_xpath("//allowUserName").inner_text.eql? "true")
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
exlibris-primo-2.1.1 lib/exlibris/primo/review.rb
exlibris-primo-2.1.0 lib/exlibris/primo/review.rb
exlibris-primo-2.0.0 lib/exlibris/primo/review.rb
exlibris-primo-1.1.9 lib/exlibris/primo/review.rb
exlibris-primo-1.1.8 lib/exlibris/primo/review.rb
exlibris-primo-1.1.7 lib/exlibris/primo/review.rb
exlibris-primo-1.1.6 lib/exlibris/primo/review.rb
exlibris-primo-1.1.5 lib/exlibris/primo/review.rb
exlibris-primo-1.1.4 lib/exlibris/primo/review.rb
exlibris-primo-1.1.3 lib/exlibris/primo/review.rb
exlibris-primo-1.1.2 lib/exlibris/primo/review.rb
exlibris-primo-1.1.1 lib/exlibris/primo/review.rb
exlibris-primo-1.1.0 lib/exlibris/primo/review.rb
exlibris-primo-1.0.11 lib/exlibris/primo/review.rb
exlibris-primo-1.0.10 lib/exlibris/primo/review.rb
exlibris-primo-1.0.9 lib/exlibris/primo/review.rb
exlibris-primo-1.0.8 lib/exlibris/primo/review.rb
exlibris-primo-1.0.7 lib/exlibris/primo/review.rb
exlibris-primo-1.0.6 lib/exlibris/primo/review.rb
exlibris-primo-1.0.5 lib/exlibris/primo/review.rb