Class: Hyrax::ResourceSync::ResourceListWriter

Inherits:
Object
  • Object
show all
Defined in:
lib/hyrax/resource_sync/resource_list_writer.rb

Overview

TODO: the big assumption I’m making here is that the repository has fewer than 50,000 resources to list. The Sitemap protocol is limited at 50,000 items, so if we require more than that, we must have multiple Resource lists and add a Resource List Index to point to all of them.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource_host:, capability_list_url:) ⇒ ResourceListWriter

Returns a new instance of ResourceListWriter.



10
11
12
13
# File 'lib/hyrax/resource_sync/resource_list_writer.rb', line 10

def initialize(resource_host:, capability_list_url:)
  @resource_host = resource_host
  @capability_list_url = capability_list_url
end

Instance Attribute Details

#capability_list_urlObject (readonly)

Returns the value of attribute capability_list_url.



8
9
10
# File 'lib/hyrax/resource_sync/resource_list_writer.rb', line 8

def capability_list_url
  @capability_list_url
end

#resource_hostObject (readonly)

Returns the value of attribute resource_host.



8
9
10
# File 'lib/hyrax/resource_sync/resource_list_writer.rb', line 8

def resource_host
  @resource_host
end

Instance Method Details

#writeObject



15
16
17
# File 'lib/hyrax/resource_sync/resource_list_writer.rb', line 15

def write
  builder.to_xml
end