Class: Exlibris::Primo::Review
Overview
Instance Method Summary
collapse
Methods included from XmlUtil
included, #to_hash, #to_json, #to_xml
#write_attributes
Methods included from Namespaces
included
#availability_statuses, #base_url, #config, #facet_collections, #facet_labels, #facet_resource_types, #facet_top_level, #institution, #institutions, #libraries, #sources
Constructor Details
#initialize(*args) ⇒ Review
Returns a new instance of Review.
12
13
14
15
|
# File 'lib/exlibris/primo/review.rb', line 12
def initialize *args
@raw_xml = args.last.delete(:raw_xml)
super
end
|
Instance Method Details
#allow_user_name? ⇒ Boolean
41
42
43
|
# File 'lib/exlibris/primo/review.rb', line 41
def allow_user_name?
@allow_user_name = (xml.root.at_xpath("//allowUserName").inner_text.eql? "true")
end
|
#rating ⇒ Object
25
26
27
|
# File 'lib/exlibris/primo/review.rb', line 25
def rating
@rating = xml.root.at_xpath("//rating").inner_text
end
|
#record_id ⇒ Object
21
22
23
|
# File 'lib/exlibris/primo/review.rb', line 21
def record_id
@record_id = xml.root.at_xpath("//docId").inner_text
end
|
#status ⇒ Object
29
30
31
|
# File 'lib/exlibris/primo/review.rb', line 29
def status
@status = xml.root.at_xpath("//status").inner_text
end
|
#user_display_name ⇒ Object
37
38
39
|
# File 'lib/exlibris/primo/review.rb', line 37
def user_display_name
@user_display_name = xml.root.at_xpath("//userDisplayName").inner_text
end
|
#user_id ⇒ Object
17
18
19
|
# File 'lib/exlibris/primo/review.rb', line 17
def user_id
@user_id = xml.root.at_xpath("//userId").inner_text
end
|
#value ⇒ Object
33
34
35
|
# File 'lib/exlibris/primo/review.rb', line 33
def value
@value = xml.root.at_xpath("//value").inner_text
end
|