class Resync::CapabilityList

Public Instance Methods

change_dump() click to toggle source

Downloads and parses the change dump or change dump index. Subsequent calls will return the same parsed object. @return [ChangeDump, ChangeDumpIndex, nil] the change dump, or nil if this capability dump does not

provide one
# File lib/resync/client/mixins/capability_list_extensions.rb, line 43
def change_dump
  document_for(ChangeDump::CAPABILITY)
end
change_list() click to toggle source

Downloads and parses the change list or change list index. Subsequent calls will return the same parsed object. @return [ChangeList, ChangeListIndex, nil] the change list, or nil if this capability list does not

provide one
# File lib/resync/client/mixins/capability_list_extensions.rb, line 27
def change_list
  document_for(ChangeList::CAPABILITY)
end
document_for(capability) click to toggle source

Downloads and parses the document for the specified capability. Subsequent calls will return the same parsed object. @return [ResourceList, ResourceListIndex, ChangeList, ChangeListIndex, ResourceDump, ResourceDumpIndex, ChangeDump, ChangeDumpIndex, nil]

the document, or +nil+ if this capability list does not provide that capability
# File lib/resync/client/mixins/capability_list_extensions.rb, line 10
def document_for(capability)
  @documents ||= {}
  @documents[capability] ||= get_and_parse_resource_for(capability)
end
resource_dump() click to toggle source

Downloads and parses the resource dump or resource dump index. Subsequent calls will return the same parsed object. @return [ResourceDump, ResourceDumpIndex, nil] the resource dump, or nil if this capability dump does not

provide one
# File lib/resync/client/mixins/capability_list_extensions.rb, line 35
def resource_dump
  document_for(ResourceDump::CAPABILITY)
end
resource_list() click to toggle source

Downloads and parses the resource list or resource list index. Subsequent calls will return the same parsed object. @return [ResourceList, ResourceListIndex, nil] the resource list, or nil if this capability list does not

provide one
# File lib/resync/client/mixins/capability_list_extensions.rb, line 19
def resource_list
  document_for(ResourceList::CAPABILITY)
end

Private Instance Methods

get_and_parse_resource_for(capability) click to toggle source
# File lib/resync/client/mixins/capability_list_extensions.rb, line 49
def get_and_parse_resource_for(capability)
  resource = resource_for(capability: capability)
  resource.get_and_parse if resource
end