Class: ExistDB::ResourceSet
- Inherits:
-
Object
- Object
- ExistDB::ResourceSet
- Extended by:
- ClassWrappingForwardable
- Includes:
- Enumerable
- Defined in:
- lib/existdb/resource_set.rb
Class Method Summary collapse
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(java_obj) ⇒ ResourceSet
constructor
A new instance of ResourceSet.
Methods included from ClassWrappingForwardable
Constructor Details
#initialize(java_obj) ⇒ ResourceSet
Returns a new instance of ResourceSet.
13 14 15 |
# File 'lib/existdb/resource_set.rb', line 13 def initialize(java_obj) @obj = java_obj end |
Class Method Details
.[](*resources) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/existdb/resource_set.rb', line 24 def [](*resources) set = new( org.exist.xmldb.MapResourceSet.new ) resources.each do |resource| set.add(resource) end return set end |
Instance Method Details
#each ⇒ Object
17 18 19 20 21 |
# File 'lib/existdb/resource_set.rb', line 17 def each for i in (0 .. (size - 1)) yield self[i] end end |