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.



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

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.



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

def capability_list_url
  @capability_list_url
end

#resource_hostObject (readonly)

Returns the value of attribute resource_host.



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

def resource_host
  @resource_host
end

Instance Method Details

#writeObject



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

def write
  builder.to_xml
end