sru 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/sru/search_retrieve.rb +6 -4
- data/lib/sru/term.rb +4 -4
- metadata +3 -3
data/lib/sru/search_retrieve.rb
CHANGED
@@ -4,10 +4,12 @@ module SRU
|
|
4
4
|
|
5
5
|
# An iterator for search results which allows you to do stuff like:
|
6
6
|
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
7
|
+
# client = SRU::Client.new 'http://sru.example.com'
|
8
|
+
# for record in client.search_retrieve('Mark Twain')
|
9
|
+
# puts record
|
10
|
+
# end
|
11
|
+
#
|
12
|
+
# The records returned are REXML::Document objects.
|
11
13
|
|
12
14
|
class SearchResponse < Response
|
13
15
|
include Enumerable
|
data/lib/sru/term.rb
CHANGED
@@ -2,16 +2,16 @@ module SRU
|
|
2
2
|
|
3
3
|
# a class for representing a term in the response from a sru server
|
4
4
|
class Term < Response
|
5
|
-
attr_accessor :value, :number_of_records, :
|
6
|
-
:
|
5
|
+
attr_accessor :value, :number_of_records, :display_term, :where_in_list,
|
6
|
+
:extra_term_data
|
7
7
|
|
8
8
|
def initialize(element)
|
9
9
|
super element
|
10
10
|
@value = xpath('value')
|
11
11
|
@number_of_records = xpath('numberOfRecords')
|
12
12
|
@display_term = xpath('displayTerm')
|
13
|
-
@
|
14
|
-
@
|
13
|
+
@where_in_list = xpath('whereInList')
|
14
|
+
@extra_term_data = xpath_first('extraTermData')
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.
|
2
|
+
rubygems_version: 0.9.2
|
3
3
|
specification_version: 1
|
4
4
|
name: sru
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.
|
7
|
-
date:
|
6
|
+
version: 0.0.4
|
7
|
+
date: 2007-12-13 00:00:00 -05:00
|
8
8
|
summary: a Ruby library for Search and Retrieve by URL
|
9
9
|
require_paths:
|
10
10
|
- lib
|